I'm interested in knowing if it would be at all feasible to be able to send text messages via PHP. The main purpose of which would be to send a single message to a group of people - 10+ - with updates regarding news and such. Preferably the solution should be free, though it is not a necessity in any way. Thanks to all in advance.
I've done this with PHP, and it works very well. Text messages are nothing more than an email, usually with the receiver's 10 digit number @address.com. If you want to send text messages to someone with PHP, you'll need to get the proper address:
Here is a Partial List
You'll want to be careful with how long your messages get, since at about 55 characters (I believe) your message can be either split into multiple texts, or lost.
Sending texts via email is free.
I'm interested in knowing if it would be at all feasible to be able to send text messages via PHP
Of course, it is feasible ;-)
Everything can be done, in PHP ;-)
For more informations, you can take a look at these questions/answers, which provide some useful informations :
There are several providers that you can use as gateway to send SMS ; still, probably not free (SMS are not free, after all, generally speaking) -- but costs are not that big...
If you have your own android phone and don't want to pay for a SMS Gateway you can set up your own one.
download SMS Gateway API (Play store) which is a free app that you can use to send and receive messages using HTTP requests. here is a PHP example from their site.
$URL = "http://v2.smsgateway.me/API/Send/Single.php";
$postdata = http_build_query(
array(
'Username' => "[email protected]",
'Password' => "password",
'Number' => "+447791064782",
'Message' => "Hello World!",
)
);
$opts = array('http' => array('method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => $postdata));
$context = stream_context_create($opts);
$result = file_get_contents($URL, false, $context);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With