<?php
function send_sms($from, $to, $message) {
// Set your account username and password here
$username = "User";
$password = "Pass";
$base_url = "https://get.spiricom.spirius.com:55001/cgi-bin/sendsms";
$query = $base_url.
"?User=".urlencode($username).
"&Pass=".urlencode($password).
"&To=" .urlencode($to).
"&From=".urlencode($from).
"&Msg=" .urlencode($message);
$response = file_get_contents($query, false);
if (!strstr($http_response_header[0],"202 Accepted")) {
return $http_response_header[0];
}
return $response;
}
echo send_sms ("+46123456789", "+46123456789", "Hello") . "\n";
?>