Ti posto il mio metodo, l'ho commentato:
Codice PHP:
<?php
$text_to_send="Corpo dell'SMS...";
$phone_number='+393330000000';//+39PrefissoNumero del destinatario
$sender='Mario Rossi Srl';//Aruba non garantisce che sarà utilizzato, potrebbe essere sostituito da un numero di telefono "random"
$url='http://admin.sms.aruba.it/sms/batch.php';
$data=array(
'user'=>'Sms00000', 'pass'=>'a0a0a0a0',//i tuoi user e password per inviare SMS
'rcpt'=>$phone_number, 'data'=>substr($text_to_send,0,160),
'sender'=>$sender, 'qty'=>'h'
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context=stream_context_create($options);
$result=file_get_contents($url, false, $context);//$result conterrà il responso
?>
Forse sarebbe il caso di spostare il thread in PHP?