Link to home
Start Free TrialLog in
Avatar of JOHNFROG
JOHNFROG

asked on

How to receive a http post from remote server

Can someone put me on the right path trying to understand what needs to be done to receive a http request from a 3rd party?

My information provider says :
"We will post to you as each message comes in to a URL such as:
http://www.yourserver.com/
receivesms.php?to=TO
&from=FROM&msg=MSG
&date=DATE"

But I want to know how to read this information so that I can add it to a database or dsplay on screen.


Avatar of -Thespian-
-Thespian-
Flag of Ukraine image

u need a php hosting on http://yourserver.com/
there u need to have a receivesms.php file with the contens of gathering data and putting it to DB.
if 3rd party company can post data to other url, u need to create page by that url.
for example in php that would be (but it is not safe. it is only example):

<?
$link = mysql_connect('<server>', '<username>', '<password>');
if (!$link) {
  die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_select_db(<database>);
mysql_query("INSTERT INTO `<table>` (`to`, `from`, `message`, `date`) VALUES ('{$_GET['to']}', '{$_GET['from']}', '{$_GET['message']}', 'date')");
?>

Open in new window

Avatar of JOHNFROG
JOHNFROG

ASKER

Ok but I'm afraid I am more confused now. I think the example given from the provider is aimed at php developer. I am using ASP.NET so sorry for the confusion.

Just need some clues on where to start. Do I need to create a web service?  If the information is sent to my URL then what do I need to do to process it.
ASKER CERTIFIED SOLUTION
Avatar of -Thespian-
-Thespian-
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I really think that i understand this now. Thabks very much