Не, у них нет, попробую от 1.5 подкинуть, там гейт то...62 строки
<?php
final class SmsRu extends SmsGate {
/**
s-m-o-k@list.ru
http://10768.sms.ru/
*/
public function send() {
$results = array();
$to = $this->to;
if($this->copy) {
$to .= "," . $this->copy;
}
$params['to'] = $to;
$params['text'] = $this->message;
if(strlen($this->from) > 0) {
$params['from'] = $this->from;
}
$ch = curl_init("http://sms.ru/auth/get_token");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$token = curl_exec($ch);
curl_close($ch);
$params['partner_id'] = 29136;
$params['login'] = $this->username;
$params['sha512'] = hash("sha512", $this->password . $token);
$params['token'] = $token;
$url = 'http://sms.ru/sms/send';
$post = http_build_query($params, '', '&');
if(function_exists('curl_init')) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
curl_close($ch);
} else {
$context = stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'content' => $post,
'timeout' => 30,
),
));
$response = file_get_contents($url, false, $context);
}
// uncomment to see results
$log = new Log('sms.txt');
$log->write($response);
return json_decode($response, true);
}
}
?>