Hello,
I have a question about the use off the http api from the company clickatell.
They actually have several api that you can use, amongst are xml and smtp also.
Does anyone have any experience with those, especially with the http api.
For the http api:
Does this php code actually doing the work in the background?
This line $ret = file($url); - I am sorry, I haven't setup anything yet to test it. I am just trying to find out wich api I can start testing with -.
Also, is there a performance difference between using smtp api and http api?
// SMS gateway script
$user = "XXXX";
$password = "XXXXXX";
$api_id = "XXXXXX";
$baseurl ="http://api.clickatell.com";
$text = urlencode("HTTP://WWW.TIMES.COM/DOWNLOADS/SUGRAFREE.SISX");
$to = $_POST["phone number"];
// auth call
$url = "$baseurl/http/auth?user=$user&password=$password&api_id=$api_id";
// do auth call
$ret = file($url);
// split our response. return string is on first line of the data returned
$sess = split(":",$ret[0]);
if ($sess[0] == "OK") {
$sess_id = trim($sess[1]); // remove any whitespace
$url = "$baseurl/http/sendmsg?session_id=$sess_id&to=$to&text=$text";
// do sendmsg call
$ret = file($url);
$send = split(":",$ret[0]);
if ($send[0] == "ID")
echo "An Email with account details and SMS has been sent..
thanks, Richard