• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
    • 軟件測試技術
    • 軟件測試博客
    • 軟件測試視頻
    • 開源軟件測試技術
    • 軟件測試論壇
    • 軟件測試沙龍
    • 軟件測試資料下載
    • 軟件測試雜志
    • 軟件測試人才招聘
      暫時沒有公告

    字號: | 推薦給好友 上一篇 | 下一篇

    通過ICQ網關發送手機短信的PHP源程序

    發布: 2007-7-14 19:53 | 作者: 佚名    | 來源: 網絡轉載     | 查看: 10次 | 進入軟件測試論壇討論

    領測軟件測試網 <?
    //###########################################################
    //
    // For questions and comments
    // Roland (alias -=: Vlieg :=-)
    // icq #78354631
    // mail: vlieg@atoo.net.net
    //
    // NB: This script won't work on free hosting pages, because of the secure mode!
    // NB: You must have registered your ICQ# at http://web.icq.com/sms/login/ in order for this script to work
    //###########################################################


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

    $uin=""; //your ICQ number
    $passw=""; //your ICQpassword

    $prefix=""; //sms prefix
    $phonenumber=""; //sms phone number
    $message = "Hello!"; //sms message


    //****************************************************************\// EN: calculate the content length

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

    //****************************************************************\// Openen van de inlogpagina
    // EN: open loginpage

    $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."; sms_country=".$prefix."; KarmaService1=Yes; uin=".$uin."; sms_country=".$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 FOR OUTPUT: echo "".htmlspecialchars($htmlreply)."";
    fclose($remote);

    //****************************************************************\//persoonlijke cookie uit de inlogpage halen
    // EN: fetch personal cookie from login page

    $splited = split("\n",$htmlreply);
    $cookies = $splited[3];
    $cookies = str_replace("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)
    );

    //****************************************************************\//Verzendpagina openen met de opgehaalde cookie
    // EN: open send page with fetched cookie

    $htmlreply="";
    $post ='POST http://web.icq.com/sms/send_history/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.'; sms_country='.$prefix.'; KarmaService1=Yes; KarmaLogin='.$cookies.'; uin='.$uin.'; sms_country='.$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 FOR OUTPUT: echo "".htmlspecialchars($htmlreply)."";
    fclose($remote);

    //****************************************************************\// check if message is send if send 'moved permanently' is returned

    if (eregi('Moved Permanently',$htmlreply))
    { echo "Sms message successfully sent!"; }
    else
    { echo "Sms not sent!"; }
    ?>

    文章來源于領測軟件測試網 http://www.kjueaiud.com/


    關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
    版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
    北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備2023014753號-2
    技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

    軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>