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

2016-01-29 14:42 14 1 收藏

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

【 tulaoshi.com - PHP 】

  通过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='.$pre

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/php/)

来源:https://www.tulaoshi.com/n/20160129/1493992.html

延伸阅读
好铃声怎么设置手机短信铃声   1)打开并安装,点击导航栏中的。   2)选择,在栏中选择自己喜欢的铃声即可。  
iphone手机短信特殊字符bug怎么修复   重启后再次打开短信,如果来直接到短信列表,那么程序会马上再次崩溃,而如果直接来到包含此短信的会话,会尝试跳转到另一个对话,然后还是崩溃。 这样一来短信功能将完全被废掉,但也是可以自救的,一www.Tulaoshi.com是让别人再给你发一条正常短信,二是通过Siri或者系统分享功能自己...
标签: PHP
             来源:Richard Heyes       <?php   class html_mime_mail{      var $headers;   var $body;   var $multipart;   var $mime;   var $html;   v...
标签: Android
安卓手机短信删除了怎么恢复 毫无疑问,iOS、Android已经成为这个世界上最主流的两大移动操作系统,其中,Android是绝对的霸主。很多用户因为操作系统开放性的原因选择了安卓手机,在生活中,我们随处可见安卓手机。很多安卓手机用户在使用手机的过程中,经常会出现误删手机短信的现象,很多时候,我们的短信中都保存了很多重要的资料,一...
标签: PHP
          来源:Richard Heyes       <?   error_reporting(63);   include('class.html_mime_mail.inc');      /***************************************   ** Example of usage.   ************...

经验教程

113

收藏

70
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部