How can my PHP script verify that a 2-Way request came from Now SMS? | Search |
NowSMS Support Forums ⬆ NowSMS Support - SMS Issues ⬆ Archive through April 11, 2011 ⬆ |
◄ ► |
Author | Message | |||
Adrian Thompson New member Username: Doors Post Number: 1 Registered: 01-2011 |
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 |
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 |
Thanks. The second option sounds like it will do the trick. |