Nieno Posted December 28, 2010 Share Posted December 28, 2010 Sorry, I've no idea where to place this topic. Excuse me for my bad English. Hi, First of all, I've 0,01 knowlegde of PHP. I only know the basic of basicness. Excuse me for that. I would like to set-up a simple script which does the following: On a website is a numerically value (0,00). Once a SMS has been sended, the SMS-system will request for an URL. That request will take care of raising the value on the website with a X value (e.g. 0,01). How should I handle this? I hope it's clear what I mean. Thanks a lot. Quote Link to comment Share on other sites More sharing options...
cmattoon Posted January 8, 2011 Share Posted January 8, 2011 Its hard to say without knowing specifics of your SMS system. Typically, we use the mail() for our in-house projects (0000000000@vtext.com). If you're using a commercial SMS gateway, it really depends on how the program works. I don't have much experience with them. To handle incrementing a value that's stored in the database, I'd probably set up a "listener" script that uses a GET request to increment the number. (pseudocode)... SMS gateway visits "listener.php?val=inc" $val=$_GET['val']; if($val == "inc"){ $sql = mysql_query("SELECT value FROM database"); $sql ++; $result = mysql_query("UPDATE value IN database"); if($result){ //Success }else{ //Fail } }else{ //Do nothing, invalid 'val' value. } Again, I have no idea what your SMS gateway supports.... this is just a general idea from what I've used with other listener scripts. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.