How to receive a text from a phone number with php?


I am making an application where you can text anybody from your computer. Or at least attempting too. It is for learning. My application accesses a php script to send the text, this i can do just fine, but if i want someone to text back, how in the world would i do that? I wanted to do some sort of email thing where you have an account on the site and stuff, but how would i receive the text! I really really really need help on this, and asap. Thanks for reading.

2 Responses to “How to receive a text from a phone number with php?”

  • Angela Q:

    You have to have a mobile account in the equation, too. I looked into it once. People who do that sort of programming are not using php.

    http://www.developershome.com/sms/howToSendSMSFromPC.asp

    You can do this through your gmail account now. So maybe you can save yourself the trouble of writing an application.

  • AquaGames:

    Well, if you’re using forms on a HTML page, it’s quite simple.
    $_POST['number'] will return the value of the field with the name ‘number’ in the previous page’s form (which user did click submit, or it was invoked by JavaScript or something else).
    You might want to check to see if it exists, so if someone gets to that page without filling in the form, it will not give an error. Something like:
    <?php
    if($_POST['number']) {
    echo ‘The number is: ‘.$_POST['number']
    }
    else {
    exit //or maybe:
    echo ‘Failed to recieve form data.’
    ?>

Leave a Reply