欢迎光临
我们一直在努力

用PHP做短信开发-PHP教程,PHP应用

建站超值云服务器,限时71元/月

php代码:——————————————————————————–

<?

//###########################################################

//

// for questions and comments

// roland (alias -=: vlieg :=-)

// icq #78354631

// mail: vlieg@atoomnet.net

//

// nb: this script wont work on free hosting pages, because of the secure mode!

// nb: you must have registered your icq# at <a href="http://web.icq.com/sms/login/" target="_blank">http://web.icq.com/sms/login/</a> in order for this script to work

//###########################################################

//****************************************************************\

//config:

$uin=""; //your icq number

$passw=""; //your icqpassword

$prefix="27"; //sms prefix

$phonenumber="0000000"; //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 <a href="http://web.icq.com/karma/dologin/1,,,00.html" target="_blank">http://web.icq.com/karma/dologin/1,,,00.html</a> http/1.0

accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*

referer: <a href="http://web.icq.com/sms/login/1,,,00.html" target="_blank">http://web.icq.com/sms/login/1,,,00.html</a>

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 <a href="http://web.icq.com/sms/send_history/1,,,00.html" target="_blank">http://web.icq.com/sms/send_history/1,,,00.html</a> http/1.0

accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*

referer: <a href="http://web.icq.com/sms/send_session…0.html?prefix=+" target="_blank">http://web.icq.com/sms/send_session…0.html?prefix=+</a>.$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!";

}

?>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 用PHP做短信开发-PHP教程,PHP应用
分享到: 更多 (0)

相关推荐

  • 暂无文章