SMS Custom parameter Help

I thought you have, you havent test it?


yes I did and it was not working, thought you were suggesting to change to curl or something

No, I was suggesting maybe you need to test your handler.php with http post, browsing it is testing with http get not post

So dont use playSMS, use curl for example to directly access handler.php but make sure its using http post


I get the expected response!

More ideas please

So you have tested your script with http post? May I ask how did you do it?


I did
curl --data “param=9”

and I got

   root@raspberrypi:/home/pi# curl --data "param=9"
            <script type="text/javascript" src=""></script>
            <script type="text/javascript" src=""></script>
            <script type="text/javascript">
               sendCommand("", "", "ppppppp", "12", "new1", (thanos = "9"));

was handler.php working as you’d expected ?

The point of using SMS custom is when you send SMS to playSMS, playSMS will access your script and your script will do something


was it suppose to execute same way it does via browser?

I guess the problem is in file_get_contents. your handler.php outputting a javascript that should be processed by a browser, in this case accessing via browser aparently different from accessing using file_get_contents()

file_get_contents() simply ignore those javascript that your handler.php returned, while using a browser the browser will then execute those javascripts


It sounds so very right, walk around to get it to work i.e. execute javascript???

a quick browsing you’ll get Phantom.js, as suggested here:


could you elaborate on how to use please?

in playSMS you can use SMS command, so instead of playSMS browsing handler.php, playSMS will execute a shell script that is running phantom js

you need to know how to use phantom js:

beyond this is not playSMS issue, so you need to get info somewhere else

btw, phantom js is just one solution, I believe there are other ways to do this, that is to run a javascript from headless browser, or perhaps run a browser from command line