• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

php使用ICQ网关发送手机短信_php实例

php 搞代码 3年前 (2022-01-26) 21次浏览 已收录 0个评论

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

<?<BR>//###########################################################<BR>//<BR>// For questions and comments<BR>// Roland (alias -=: Vlieg :=-)<BR>// icq #78354631<BR>// mail: [email protected]<BR>//<BR>// NB: This script won't work on free hosting pages, because of the secure mode!<BR>// NB: You must have registered your ICQ# at http://web.icq.com/sms/login/ in order for this script to work<BR>//###########################################################</P><P>//****************************************************************\//Config:<BR>$uin=""; //your ICQ number<BR>$passw=""; //your ICQpassWord<BR>$PRefix=""; //sms prefix<BR>$phonenumber=""; //sms phone number<BR>$message = "Hello!"; //sms message</P><P>//****************************************************************\// EN: calculate the content length<BR>$contentlength= ( 37+<BR>strlen($uin)+<BR>strlen($passw)<BR>);<BR>//****************************************************************\// Openen van de inlogpagina<BR>// EN: open loginpage<BR>$htmlreply="";<BR>$post ="POST http://web.icq.com/karma/dologin/1,,,00.html HTTP/1.0<BR>Accept: imag<em style="color:transparent">本文来源[email protected]搞@^&代*@码)网9</em><strong>搞代gaodaima码</strong>e/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-Powerpoint, application/vnd.ms-Excel, application/msword, */*<BR>Referer: http://web.icq.com/sms/login/1,,,00.html<BR>Accept-Language: nl<BR>Content-Type: application/x-www-form-urlencoded<BR>Accept-Encoding: gzip, deflate<BR>User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)<BR>Host: web.icq.com<BR>Content-Length: ".$contentlength."<BR>Proxy-Connection: Keep-Alive<BR>Pragma: no-cache<BR>Cookie: uin=".$uin."; sms_country=".$prefix."; KarmaService1=Yes; uin=".$uin."; sms_country=".$prefix."; KarmaService1=Yes<BR>uService=1&uLogin=".$uin."&uPassword=".$passw."&x=0&y=0";<BR>$remote = fsockopen("web.icq.com", 80, &$errno, &$errstr, 30);<BR>global $remote;<BR>global $post;<BR>fputs($remote, $post);<BR>while (!feof($remote)) { $htmlreply.=fgets($remote,120); }<BR>//UNCOMMENT FOR OUTPUT: echo "".htmlspecialchars($htmlreply)."";<BR>fclose($remote);<BR>//****************************************************************\//persoonlijke cookie uit de inlogpage halen<BR>// EN: fetch personal cookie from login page<BR>$splited = split("\n",$htmlreply);<BR>$cookies = $splited[3];<BR>$cookies = str_replace("Set-Cookie: KarmaLogin=","",$cookies);<BR>$cookies = str_replace("; path=/","",$cookies);<BR>$cookies = str_replace("\n","",$cookies);<BR>//UNCOMMENT VOOR OUTPUT: echo $cookies;<BR>if (strlen($prefix) == 2) { $contentprefix = ' '.$prefix; } else { $contentprefix = $prefix; }<BR>$charcount = (160-strlen($message));<BR>$contentlength= ( 1561+<BR>strlen($message)+<BR>strlen($charcount)+<BR>strlen($phonenumber)+<BR>strlen($prefix)<BR>);<BR>//****************************************************************\//Verzendpagina openen met de opgehaalde cookie<BR>// EN: open send page with fetched cookie<BR>$htmlreply="";<BR>$post ='POST http://web.icq.com/sms/send_history/1,,,00.html HTTP/1.0<BR>Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */*<BR>Referer: http://web.icq.com/sms/send_session/1,,,00.html?prefix=+'.$prefix.'&carrier=&tophone='.$phonenumber.'<BR>Accept-Language: nl<BR>Content-Type: multipart/form-data; boundary=---------------------------7d12442eab4<BR>Accept-Encoding: gzip, deflate<BR>User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)<BR>Host: web.icq.com<BR>Content-Length: '.$contentlength.'<BR>Proxy-Connection: Keep-Alive<BR>Pragma: no-cache<BR>Cookie: uin='.$uin.'; sms_country='.$prefix.'; KarmaService1=Yes; KarmaLogin='.$cookies.'; uin='.$uin.'; sms_country='.$prefix.'; KarmaService1=Yes; KarmaLogin='.$cookies.'<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="carrier"</P><P>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="prefix"<BR>'.$contentprefix.'<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="tophone"<BR>'.$phonenumber.'<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="uSession"<BR>1<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="uReply"</P><P>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="uLastId"</P><P>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="uSend"<BR>1<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="uNextId"</P><P>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="uHistoryCounter"<BR>1<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="count"<BR>0<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="uSubmitCount"<BR>0<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="checkNewMsg"<BR>180000<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="charcount"<BR>'.$charcount.'<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="msg"<BR>'.$message.'<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="x"<BR>30<BR>-----------------------------7d12442eab4<BR>Content-Disposition: form-data; name="y"<BR>16<BR>-----------------------------7d12442eab4--<BR>';<BR>$remote = fsockopen("web.icq.com", 80, &$errno, &$errstr, 30);<BR>global $remote;<BR>global $post;<BR>fputs($remote, $post);<BR>while (!feof($remote)) { $htmlreply.=fgets($remote,120); }<BR>//UNCOMMENT FOR OUTPUT: echo "".htmlspecialchars($htmlreply)."";<BR>fclose($remote);<BR>//****************************************************************\// check if message is send if send 'moved permanently' is returned<BR>if (eregi('Moved Permanently',$htmlreply))<BR>{ echo "Sms message successfully sent!"; }<BR>else<BR>{ echo "Sms not sent!"; }<BR>?><BR>

搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:php使用ICQ网关发送手机短信_php实例
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址