Hi,
There is a free script at
http://www.txtlocal.com/sms-api.php - simply sign up for a free account and you can play with 10 messages. If it works for you then you can buy more in bundles from 100 to 1 million!
Code:
<?php
//set up variables
$info = "1";
$address = "www.txtlocal.com/sendsmspost.php";
$message = "Hello this is a test with an ampersand (&) and a £5 note";
$message = urlencode($message); //encode special characters (e.g. £,& etc)
$from = "Jims Autos";
$uname = "youremailaddress";
$pword = "yourpassword";
$selectednums = "447740101098";
//build url
$data = "uname=" . $uname . "&pword=" . $pword . "&message=" . $message . "&from=" . $from . "&selectednums=" . $selectednums . "&info=" . $info;
//send messages
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://$address");
//curl_setopt($ch, CURLOPT_URL,"https://$address"); //secure connection
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
//curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //use this to suppress output
$result = curl_exec ($ch);
curl_close ($ch);
?>
If in the USA you may HAVE to set the FROM element to a short code. (short mobile number)
If you have any questions please get in touch.
Many thanks,
Alastair
CTO
http://www.txtlocal.com