通过ICQ网关发送手机短信的PHP源程序

来源:互联网 发布:C语言roll程序 编辑:程序博客网 时间:2024/05/28 11:48
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
通过ICQ网关发送手机短信PHP源程序
(转自linuxforum.net 原作者: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 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!"; }
?>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 魅族手机变成英文怎么办 员工失去了工作乐趣怎么办 古墓丽影9出bug怎么办 气炉子打不着火怎么办 下面人员不参加公司拓展怎么办 重点班的差生怎么办 江苏考生选修考d怎么办 眼睛里有虫子该怎么办 屋里毛絮特别多怎么办 信用卡人员核核查单位地址怎么办 红米note电源键失灵怎么办 红米note4x跳屏怎么办 红米开机键坏了怎么办 红米note2开关键不灵敏怎么办 大学生论文检测系统忘记密码怎么办 快手实验室没有k歌怎么办 皮肤一到冬天就会起皮脱落怎么办 嘴上的皮撕破了怎么办 身体皮肤干燥起皮怎么办 把公司数据库弄宕机了怎么办 地铁上临时变站怎么办 大学实践课挂了怎么办 军训的人长得矮怎么办 军训脸被晒黑了怎么办 晚上吃了油炸的怎么办 楼梯又陡又窄怎么办 小孩不认真做作业怎么办 水厂出水水质不达标怎么办 野猪铁夹子夹到怎么办 燃气灶开孔尺寸大了怎么办 苹果电脑视频显示缺少插件怎么办 安装拼多多显示校验失败怎么办 中央庭黑盒被抢怎么办 lab值a值偏高怎么办 橱房管道堵死了怎么办 微信被别的手机同步登录怎么办 计算机机房空调坏了怎么办 被蝎子蛰了怎么办怎么处理? 月嫂走了孩子闹怎么办 转业军人自建房有困难怎么办 转业军人没配偶想异地安置怎么办