How can my PHP script verify that a 2-Way request came from Now SMS?

How can my PHP script verify that a 2-Way request came from Now SMS? Search Search

SMS & MMS Technical Forum » NowSMS Support - SMS Issues (Product Support Only) » Archive through April 11, 2011 » How can my PHP script verify that a 2-Way request came from Now SMS? « Previous || Next »
Author Message
Adrian Thompson
New member
Username: Doors

Post Number: 1
Registered: 01-2011
Posted on Sunday, January 16, 2011 - 09:40 pm:   

I have setup the software and the 2-Way option. I saw that someone could just enter my the URL with a message body and the script wouldn't know that this came from the browser and not NOWSMS.

How can I setup my php script to never be fooled by such a thing happening?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2833
Registered: 08-2008
Posted on Monday, January 17, 2011 - 01:12 pm:   

Hi Adrian,

You have complete control over the parameters included in the 2-way request, so you can include magic parameters that your PHP script requires.

Another approach would be to have your PHP script check the IP address of the requester to make sure it matches the address of the NowSMS server: $_SERVER['REMOTE_ADDR']

--
Des
NowSMS Support
Adrian Thompson
New member
Username: Doors

Post Number: 4
Registered: 01-2011
Posted on Monday, January 17, 2011 - 01:38 pm:   

Thanks. The second option sounds like it will do the trick.

Login Login / Register Search Search   Home Home
Logout Logout Topics Topics Search Last 1|3|7|30 Days   Previous Page Previous Next Next Page