Log in

View Full Version : Send sms in PHP



Arjun21
06-11-2011, 08:31 AM
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

djr33
06-11-2011, 04:08 PM
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.

bluewalrus
06-11-2011, 04:38 PM
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).


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.