Faeton (faeton) wrote in lj_textmessage,
Faeton
faeton
lj_textmessage

  • Mood:
  • Music:

Ukrainian cell operators - Kyivstar & UMC

ua.Kyivstar
Messages can be sent via email gateway which is slow and unstable. Still the way it works is:
fullphonenumber@gate.kyivstar.net, where "fullphonenumber" is the 12-digit phone number (like 38067xxxxxxx), and "gate" depends on the first digit of the phone number - if it is "7xxxxxx" than gate is "2sms" or else - just "sms". 380677123456@2sms.kyivstar.net for example.
Or messages can be sent via web-page which is more reliable. Here's an example of PHP code which does everything:


// posted vars
$number = '1234567'; // 7-digit phone number
$text = "SubTest!"; // text to be sent

// else
$phone = '067'.$number;


$len = 160 - strlen($text);
$words = urlencode($text);
$post = "to_addr=$number&dcs=0&new_body=$text&len=$len";
$plen = strlen($post);

// http query
$q = array();
$q[] = 'POST http://www.kyivstar.net/cgi-bin/sms1.pl HTTP/1.0';
$q[] = 'Accept: image/*, */*';
$q[] = 'Referer: http://www.kyivstar.net/service/lib/sms_send.html';
$q[] = 'Accept-Language: ru';
$q[] = 'Content-Type: application/x-www-form-urlencoded';
$q[] = 'User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)';
$q[] = 'Host: www.kyivstar.net';
$q[] = 'Content-Length: '.$plen;
$q[] = 'Pragma: no-cache';
$q[] = '';
$q[] = $post;
$q[] = '';
$q = implode("\n", $q);

$s = fsockopen('www.kyivstar.net', 80, $errno, $errstr, 30);
fputs($s, $q);
$rcvd = '';
while(!feof($s)) {
$rcvd .= fgets($s, 128);
}
fclose($s);

# DEBUG
print $rcvd;



ua.UMC
Situation is the same as above. fullphonenumber@sms.umc.com.ua works, but sending via web gate for messages is much faster.
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 12 comments