5 Replies - 250 Views - Last Post: 11 March 2014 - 01:48 PM Rate Topic: -----

#1 mutago234  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 144
  • Joined: 08-September 13

sms working on computer but not on mobile phone

Posted 10 March 2014 - 08:15 AM

I just develop an application for sending SMS from internet via website.
It works fine.
<form action="sms.php" method="post">
<table align="center" width="50%">
<tr><td>Phone Number </td><td><input type="text" name="recipient" value="" /></td></tr>

<tr><td></td><td><input type="submit" value="Send Message" name="submit" /></td></tr>
</table>
</form>


<?php
$user="im";
$senderID="fred";
$pass='im606';
$receipientno="";
$cid="";
$mess="welcome";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, "http://www.nigerianbulksms.com/components/com_spc/smsapi.php?username=$user&password=$pass&recipient=".$_POST['recipient']."&sender=$senderID&message=$mess");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"user=$user&senderID=$senderID&receipientno=$receipientno&cid=$cid");
$buffer = curl_exec($ch);
print($buffer);
curl_close($ch);

?>


but when i tried sending the sms using mobile phone or 3g usb moderm it displays error
Not Acceptable

An appropriate representation of the requested resource /components/com_spc/smsapi.php could not be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips DAV/2 mod_bwlimited/1.4 Server at www.nigerianbulksms.com Port 80

I think the problem has to do with port number.

Is This A Good Question/Topic? 0
  • +

Replies To: sms working on computer but not on mobile phone

#2 pedro93  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 01-November 12

Re: sms working on computer but not on mobile phone

Posted 10 March 2014 - 11:47 AM

View Postmutago234, on 10 March 2014 - 03:15 PM, said:

I just develop an application for sending SMS from internet via website.
It works fine.
<form action="sms.php" method="post">
<table align="center" width="50%">
<tr><td>Phone Number </td><td><input type="text" name="recipient" value="" /></td></tr>

<tr><td></td><td><input type="submit" value="Send Message" name="submit" /></td></tr>
</table>
</form>


<?php
$user="im";
$senderID="fred";
$pass='im606';
$receipientno="";
$cid="";
$mess="welcome";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, "http://www.nigerianbulksms.com/components/com_spc/smsapi.php?username=$user&password=$pass&recipient=".$_POST['recipient']."&sender=$senderID&message=$mess");

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,"user=$user&senderID=$senderID&receipientno=$receipientno&cid=$cid");
$buffer = curl_exec($ch);
print($buffer);
curl_close($ch);

?>


but when i tried sending the sms using mobile phone or 3g usb moderm it displays error
Not Acceptable

An appropriate representation of the requested resource /components/com_spc/smsapi.php could not be found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips DAV/2 mod_bwlimited/1.4 Server at www.nigerianbulksms.com Port 80

I think the problem has to do with port number.


This doesn't sound like a PHP error, it sounds more like a network error?

May I ask, why do you have the fields in the POSTFIELD section and in the CULOPT_URL? You would only need it in one or the other.

What SMS provider/company is sending the message?

Peter
Was This Post Helpful? 0
  • +
  • -

#3 mutago234  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 144
  • Joined: 08-September 13

Re: sms working on computer but not on mobile phone

Posted 10 March 2014 - 12:33 PM

@pedro93, you can ignore this line below as its my problem
CURLOPT_POSTFIELDS,"user=$user&senderID=$senderID&receipientno=$receipientno&cid=$cid");



am using nigerianbulksms.com.
my problem is that when connected to my office internet, it works perfect
when sms is sent from website.
but when i browse the site with mobile phone to send sms it displays the error showed above.
secondly, when i conect to internet via 3g usb moderm, it also displays the error. I think this is internet problem that has to do with simcard port number
Was This Post Helpful? 0
  • +
  • -

#4 mutago234  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 144
  • Joined: 08-September 13

Re: sms working on computer but not on mobile phone

Posted 11 March 2014 - 05:40 AM

This is not the problem with internet. i think it has to do with error 406 which suggests that the server does not support compresssion. any help please

Thank you.

This post has been edited by mutago234: 11 March 2014 - 06:21 AM

Was This Post Helpful? 0
  • +
  • -

#5 ArtificialSoldier  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 333
  • View blog
  • Posts: 1,209
  • Joined: 15-January 14

Re: sms working on computer but not on mobile phone

Posted 11 March 2014 - 10:21 AM

If it's a 406 error then you need to configure the server to support whatever the browser is sending in the Accept header. I haven't tried to get headers on a mobile device, but it sounds like you can get it to fail on a desktop so you can use your browser's developer tools to look at what is being sent in the Accept header. You could also create a PHP page which writes the $_SERVER array to an error log so that you can see all of the headers that PHP is receiving.
Was This Post Helpful? 0
  • +
  • -

#6 mutago234  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 144
  • Joined: 08-September 13

Re: sms working on computer but not on mobile phone

Posted 11 March 2014 - 01:48 PM

ok, i will work n that and then gets back to you
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1