troubleshooting Question

nowsms and php

Avatar of alzaabi
alzaabi asked on
PHP
4 Comments1 Solution1246 ViewsLast Modified:
Hi
How can I do this process using nowsms and php

I have local server url return account balances and I need to send an sms to nowsms to retarn the plan text to me cell phone
The url is http://localhost/balance/balance.php?user=xxxxx&password=xxxxxxx 
The prefix well be (balance) the test msg from my phone to nowsms well be

Balance u xxxx p xxxx
=====================
NowSMS Support
You would need to write an additional PHP script (or modify your current script) to perform further parsing of the message.

You could define the following as your 2-way command:

http://localhost/balance/balancesms.php?request=@@SMS@@ 

If you sent in a text as follows:

Balance u xxxx p xxxx

Then the resulting command to be executed would be:

http://localhost/balance/balancesms.php?request=u%20xxxx%20p%20xxxx 

The "%20" looks a little funny in the URL ... but that's just URL escaping. When you access it from your script, your scripting language should convert it back into a space. (The space character needs to be escaped to be included in a URL.)

So the end result is that your script would need to parse the string "u xxxx p xxxx".

You could have a simple PHP script that did this parsing, then redirected to the existing PHP script with the parameters set as needed
======================
I need the php code plz
thanks
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros