Jump to content
Reliance Jio & Reliance Mobile Discussion Forums
Sign in to follow this  
loop

Receiving Sms On Webserver (php)

Recommended Posts

Hi all,

Can anyone help me?

I want to recieve sms messages sent by mobile phone on my server.

My service provider is csoft.co.uk

People from US will send sms messages to some specific number provided by csoft.co.uk; and then csoft will recieve and forward those messages to my server using POST method.

They're using following format:

POST <your URL> HTTP/1.0
Content-type: application/x-www-form-urlencoded
Content-length: <size of the payload>; charset="utf-8"

Username=<username>&PIN=<pin>&SendTo=<number>&Message=<message>&ReplyTo=<number>

SEE HERE

If i'm not wrong, they are using fsockopen to push the info further.

But the problem is that i'm not getting anything on page.

They're sending messages on my pager getsms.php and in getsms.php i'm storing all incoming variables through POST into the database. But my database is still empty.

Its not getting POST variables sent by csoft.co.uk

But its working fine if i send data through simple form.

Please help.

(in php)

Share this post


Link to post
Share on other sites

dude, its as simple as using $_POST[] array to access your variables! For example the following script should show all your variables! Just name the script getsms.php and you will see them!

<?
   echo '<pre>';
   print_r($_POST);
   echo '</pre>';
?>

Edited by linuxguy

Share this post


Link to post
Share on other sites

I've tried this.. but this thing doesn't work.. And please keen in uor mind.. above code is only valid if ur posting variables from one page to another.. But in my case, the server is posting variables to a page residing on other server.. means there is no human being involved to see the result..

And its hard to store the result of print_r($_POST) into the databse.. coz this functions returns nothing but only prints the result.

Share this post


Link to post
Share on other sites

uh...doesnt matter whether the post variables are local or from one server to another. They are post variables! Why dont you make a little script to store the entire array of $_POST one key at a time?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×