通过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相关推荐

  1. 短信网关 php,php使用ICQ网关发送手机短信_PHP教程

    通过ICQ网关发送手机短信的php源程序 复制代码 代码如下: //########################################################### // // ...

  2. 短信网关 php,php使用ICQ网关发送手机短信

    php发送手机短信实例代码. 通过ICQ网关发送手机短信的php源程序 复制代码 代码如下: //################################################### ...

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

    (转自linuxforum.net 原作者:liushiliang EMAIL:  lsl@163.net ) //########################################## ...

  4. 网关短信php,通过ICQ网关发送手机短信的PHP源程序-PHP教程,PHP应用

    通过icq网关发送手机短信的php源程序 (转自linuxforum.net 原作者:liushiliang email:  lsl@163.net ) //##################### ...

  5. chatgpt赋能python:Python如何发送手机短信:实现方法解析和应用场景介绍

    Python如何发送手机短信:实现方法解析和应用场景介绍 随着移动 App 的兴起,手机短信已成为现代人日常生活中不可或缺的一部分.在有些场景下需要编写 Python 程序去自动化发送短信,例如企业营 ...

  6. 通过PC发送手机短信

    手机短信发送²        中文转换成Unicode码函数 因为手机短消息的发送是以PDU串的形式发送出去的,中文字符以Unicode码来表示,所以在发送中文短消息之前必须首先将中文字符转换为Uni ...

  7. Java实现的一个发送手机短信(亲测可用)

    原文地址:http://sms.webchinese.cn/api.shtml JAVA发送手机短信,流传有几种方法:(1)使用webservice接口发送手机短信,这个可以使用sina提供的webs ...

  8. Java 后台实现 发送手机短信的功能(中国网建)

    Java 后台实现 发送手机短信的功能(中国网建) 效果截图: 一.准备阶段 (1)准备第三方平台: 发送短信肯定是需要第三方平台,并且是收费的. 本篇以[中国网建]提供的 SMS 短信平台实现,该平 ...

  9. 为 Asp.net 网站新增发送手机短信功能

    本文旨在帮助那些为网站发送手机短信正在寻求解决方案还未最终找到解决方案的朋友提供参考. 适合人群 须满足一下条件之一,如果以下3个条件您都不满足,为节约您宝贵的时间,请终止阅读本篇文章. 条件如下: ...

最新文章

  1. 今日题解------uvalive 2689
  2. 用scikit-learn学习主成分分析(PCA)
  3. JAVA设计模式之抽象工厂模式
  4. linux shell脚本监控内存,shell脚本监控内嵌linux系统业务、CPU、内存等
  5. (转载)经典SQL语句大全3-技巧篇
  6. 通讯简单测试—Modscan32使用简介-Susie 周
  7. 净初级生产力(NPP)空间分布数据汇总整理
  8. 终于讲透了,史上最详细的RS485自动收发电路你一定要掌握
  9. 【软件定义汽车】SOA框架介绍
  10. 论文阅读之《CrowdPose: Efficient Crowded Scenes Pose Estimation and A new Benchmark》
  11. 年度催泪之作:2015中国程序员生存报告
  12. 针对网页开发者的滚动锚定功能
  13. 一阶shelf IIR数字滤波器的设计和实现
  14. 制作Code128B一维条形码的综合教程
  15. PMP相位测量轮廓术基本原理介绍
  16. 铂德发布换弹型电子烟新琥珀,3.5ml超大容量创行业纪录
  17. 生活无大事,生活无小事,需用心经营才行
  18. self和init的用法
  19. 用C语言代码编写一个五子棋小游戏
  20. GoAhead2.5源代码分析之7-form请求处理(form.c)

热门文章

  1. C语言程序设计第五版谭浩强 第七章答案
  2. 【iOS开发】——MRC(手动内存管理)的一些补充
  3. 我的物联网项目(二十五) 平账难题分析
  4. 禁U盘不禁USB设备
  5. 如何利用Pycharm将工程文件上传到服务器
  6. 4.ROSPX4--运行官方offboard起飞程序
  7. 参加2020Jam初赛记录与部分题目解答
  8. PC偏振控制器、锁模激光器技术、AOM声光调制器、相位噪声、锁相环、光耦合器类型
  9. C 语言常量pi,如何在C中使用PI常数
  10. c语言改错题字符串a放在b后面,C语言程序改错题汇总.doc