Through the ICQ network Guan Fa send mobile phone sms PHP source program _php Foundation

Source: Internet
Author: User
Through the ICQ network Guan Fa send mobile phone sms PHP source program
(Transferred from linuxforum.net Author: Liushiliang email:lsl@163.net)

?
//###########################################################
//
For questions and comments
Roland (Alias-=: Vlieg: =-)
ICQ #78354631
Mail:vlieg@atoomnet.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 the order of 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", & $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 cookies
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", & $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! ';}
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.