ICQ SMS

  • 19 years ago

    I believe i have finally found a script that will send sms messages using the ICQ network, but all the comments are writen in german or dutch or something like that.


    Are there any multi-lingual programmers out there that would be able to help me translate it?


  • 19 years ago

    If you can post the code, we might be able to work out what is happening, even if we can't understand the German... ;-)

  • 19 years ago

    Code:

    <?
    //####################################################################################################################
    //
    // Voor vragen en of opmerkingen:
    // Roland (alias -=: Vlieg :=-)
    // icq #78354631
    // mail: [email protected]
    //
    // NB: Dit script werkt NIET op gratis hostings vanwege de Secure mode!
    //
    //####################################################################################################################



    //********************\
    //Config:


    $uin="";                    //icq uin
    $passw="";                    //icq passw
       
    $prefix="27";                //sms prefix
    $phonenumber="838899178354631";    //sms telfoon
    $message = "boe schik";            //sms bericht


    //********************\
    //content lengte uitrekenen


    $contentlength= (    37+
               strlen($uin)+
               strlen($passw)
              &nbsp;


    //********************\
    // Openen van de inlogpagina


    $htmlreply="";
    $post ="POST http://web.icq.com/karma/dologin/1,,,00.html HTTP/1.0
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, /
    Referer: http://web.icq.com/sms/login/1,,,00.html
    Accept-Language: nl
    Content-Type: application/x-www-form-urlencoded
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
    Host: web.icq.com
    Content-Length: ".$contentlength."
    Proxy-Connection: Keep-Alive
    Pragma: no-cache
    Cookie: uin=".$uin."; smscountry=".$prefix."; KarmaService1=Yes; uin=".$uin."; smscountry=".$prefix."; KarmaService1=Yes


    uService=1&uLogin=".$uin."&uPassword=".$passw."&x=0&y=0";


    $remote = fsockopen("web.icq.com", 80, &$errno, &$errstr, 30);


    global $remote;
    global $post;
    fputs($remote, $post);


    while (!feof($remote)) { $htmlreply.=fgets($remote,120); }
    //UNCOMMENT VOOR OUTPUT: echo "".htmlspecialchars($htmlreply)."";
    fclose($remote);


    //********************\
    //persoonlijke cookie uit de inlogpage halen


    $splited = split("",nl2br($htmlreply));
    $cookies = $splited[3];
    $cookies = strreplace("Set-Cookie:  KarmaLogin=","",$cookies);
    $cookies = str
    replace("; path=/","",$cookies);
    $cookies = str_replace("\n","",$cookies);
    //UNCOMMENT VOOR OUTPUT: echo $cookies;


    if (strlen($prefix) == 2) { $contentprefix = ' '.$prefix; } else { $contentprefix = $prefix; }
    $charcount = (160-strlen($message));
    $contentlength= (    1561+
               strlen($message)+
               strlen($charcount)+
               strlen($phonenumber)+
               strlen($prefix)
              &nbsp;


    //********************\
    //Verzendpagina openen met de opgehaalde cookie


    $htmlreply="";
    $post ='POST http://web.icq.com/sms/sendhistory/1,,,00.html HTTP/1.0
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*
    Referer: http://web.icq.com/sms/send
    session/1,,,00.html?prefix=+'.$prefix.'&carrier=&tophone='.$phonenumber.'
    Accept-Language: nl
    Content-Type: multipart/form-data; boundary=---------------------------7d12442eab4
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
    Host: web.icq.com
    Content-Length: '.$contentlength.'
    Proxy-Connection: Keep-Alive
    Pragma: no-cache
    Cookie: uin='.$uin.'; smscountry='.$prefix.'; KarmaService1=Yes; KarmaLogin='.$cookies.'; uin='.$uin.'; smscountry='.$prefix.'; KarmaService1=Yes; KarmaLogin='.$cookies.'


    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="carrier"



    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="prefix"


    '.$contentprefix.'
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="tophone"


    '.$phonenumber.'
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="uSession"


    1
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="uReply"



    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="uLastId"



    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="uSend"


    1
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="uNextId"



    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="uHistoryCounter"


    1
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="count"


    0
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="uSubmitCount"


    0
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="checkNewMsg"


    180000
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="charcount"


    '.$charcount.'
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="msg"


    '.$message.'
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="x"


    30
    -----------------------------7d12442eab4
    Content-Disposition: form-data; name="y"


    16
    -----------------------------7d12442eab4--
    ';


    $remote = fsockopen("web.icq.com", 80, &$errno, &$errstr, 30);


    global $remote;
    global $post;
    fputs($remote, $post);


    while (!feof($remote)) { $htmlreply.=fgets($remote,120); }
    //UNCOMMENT VOOR OUTPUT: echo "".htmlspecialchars($htmlreply)."";
    fclose($remote);


    //********************\
    //kijken of hij juist verzonden is. Hij MOET dus een 'Moved Permanently' geven!
    if (eregi('Moved Permanently',$htmlreply))
       {
       Echo "Sms verzonden!";
       } else {
       echo "Er is iets fout gegaan bij het verzenden!";
       }


    ?>

  • 19 years ago

    Are there any particular bits you don't understand....?

  • 19 years ago

    Hi there,


    Would it be appreciate if someone can convert this into ASP or VB codes?

  • 19 years ago

    gringod: regarding the code you submitted, I can't get it to work... have you?

  • 19 years ago

    I've got it working now

  • 19 years ago

    Greatly appreciated it!

  • 19 years ago

    I duno if this can help on this subject but use Babelfish to translate.  Go too www.altavista.com and under the search bar find "translate" with a pic of a fish beside it.

  • 19 years ago

    This code has also been posted at


    http://www.developerfusion.com/show/1694/


    with english comments :-)

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves” - Alan Kay