短信网关 php,php使用ICQ网关发送手机短信_PHP
通过ICQ网关发送手机短信的php源程序
复制代码 代码如下:
//###########################################################
//
// 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!"; }
?>
本文原创发布php中文网,转载请注明出处,感谢您的尊重!
短信网关 php,php使用ICQ网关发送手机短信_PHP相关推荐
- 短信网关 php,php使用ICQ网关发送手机短信_PHP教程
通过ICQ网关发送手机短信的php源程序 复制代码 代码如下: //########################################################### // // ...
- 短信网关 php,php使用ICQ网关发送手机短信
php发送手机短信实例代码. 通过ICQ网关发送手机短信的php源程序 复制代码 代码如下: //################################################### ...
- 短信网关 php,通过ICQ网关发送手机短信的PHP源程序_PHP
(转自linuxforum.net 原作者:liushiliang EMAIL: lsl@163.net ) //########################################## ...
- 网关短信php,通过ICQ网关发送手机短信的PHP源程序-PHP教程,PHP应用
通过icq网关发送手机短信的php源程序 (转自linuxforum.net 原作者:liushiliang email: lsl@163.net ) //##################### ...
- chatgpt赋能python:Python如何发送手机短信:实现方法解析和应用场景介绍
Python如何发送手机短信:实现方法解析和应用场景介绍 随着移动 App 的兴起,手机短信已成为现代人日常生活中不可或缺的一部分.在有些场景下需要编写 Python 程序去自动化发送短信,例如企业营 ...
- 通过PC发送手机短信
手机短信发送² 中文转换成Unicode码函数 因为手机短消息的发送是以PDU串的形式发送出去的,中文字符以Unicode码来表示,所以在发送中文短消息之前必须首先将中文字符转换为Uni ...
- Java实现的一个发送手机短信(亲测可用)
原文地址:http://sms.webchinese.cn/api.shtml JAVA发送手机短信,流传有几种方法:(1)使用webservice接口发送手机短信,这个可以使用sina提供的webs ...
- Java 后台实现 发送手机短信的功能(中国网建)
Java 后台实现 发送手机短信的功能(中国网建) 效果截图: 一.准备阶段 (1)准备第三方平台: 发送短信肯定是需要第三方平台,并且是收费的. 本篇以[中国网建]提供的 SMS 短信平台实现,该平 ...
- 为 Asp.net 网站新增发送手机短信功能
本文旨在帮助那些为网站发送手机短信正在寻求解决方案还未最终找到解决方案的朋友提供参考. 适合人群 须满足一下条件之一,如果以下3个条件您都不满足,为节约您宝贵的时间,请终止阅读本篇文章. 条件如下: ...
最新文章
- 今日题解------uvalive 2689
- 用scikit-learn学习主成分分析(PCA)
- JAVA设计模式之抽象工厂模式
- linux shell脚本监控内存,shell脚本监控内嵌linux系统业务、CPU、内存等
- (转载)经典SQL语句大全3-技巧篇
- 通讯简单测试—Modscan32使用简介-Susie 周
- 净初级生产力(NPP)空间分布数据汇总整理
- 终于讲透了,史上最详细的RS485自动收发电路你一定要掌握
- 【软件定义汽车】SOA框架介绍
- 论文阅读之《CrowdPose: Efficient Crowded Scenes Pose Estimation and A new Benchmark》
- 年度催泪之作:2015中国程序员生存报告
- 针对网页开发者的滚动锚定功能
- 一阶shelf IIR数字滤波器的设计和实现
- 制作Code128B一维条形码的综合教程
- PMP相位测量轮廓术基本原理介绍
- 铂德发布换弹型电子烟新琥珀,3.5ml超大容量创行业纪录
- 生活无大事,生活无小事,需用心经营才行
- self和init的用法
- 用C语言代码编写一个五子棋小游戏
- GoAhead2.5源代码分析之7-form请求处理(form.c)