Results 1 to 3 of 3

Thread: Send sms in PHP

  1. #1
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Send sms in PHP

    How send SMS in PHP ?
    I need to send sms from php code but it is not working.
    Is there something else i need to do for the working of SMS code in PHP ?

    Do i need to configure the server to SMS code work in PHP

    Need help.
    Thanks

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    PHP cannot send SMS. It can use an external program to do this, so you will need to configure a program on your computer/server that can send SMS. Then you will use the command line with exec() or system() to ask that program to send the message.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    The mail function can be used if you know the address for example this should send a text message to a Verizon phone (150 chars max).

    PHP Code:
    mail'#########@vtext.com''Message to Cell Phone''This is on my phone neat?'); 
    The domain switches depending on the msg you want to send. @vzwpix.com is the domain for picture messages. This is exclusive to Verizon phones if you are using another server send a text to your mail client and copy that from address to the to address here. The from field is set in the php.ini file, the header doesnt seem to passover.
    Corrections to my coding/thoughts welcome.

  4. The Following 2 Users Say Thank You to bluewalrus For This Useful Post:

    Arjun21 (06-12-2011),djr33 (06-12-2011)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •