26th
JUN

可以自己做的飞信API

Posted by JCLee under 技术

今天又发现有人自己建立了一个飞信API,并提供给其他人使用,我测试了一下居然真的能发送通过。之前也见过其他人自己创立过这样的飞信API服务。

好奇间,就搜索想研究一下。果然,功夫不怕有心人。终于让我找到了方法。
原来飞信的通讯协议已经被破解。研究飞信通讯协议的博客地址:http://hi.baidu.com/nathan2007/ 上面都是分析的文章,虽然很久没有更新,但还是有很大的学习意义。

协议破解还是比较复杂的,看不懂就不要看了,可以直接动手做应用。
有人开源了飞信PHP版本的类库:http://code.google.com/p/phpfetionapi/

有类库,可以快速的实现应用:

<?php
include “./class_fetion.php”;

//new fetion class and init
$fetion = new fetion(’1381126xxxx’, ‘your password’);
$fetion->init() or die(“fetion init failure!\n);

//example 1
$fetion->sent_sms(‘tel:1381126xxxx’, ‘我想撒点野!’);

//example 2
$fetion->sent_sms(‘sip:58971xxxx@fetion.com.cn;p=4013′, ‘我想撒点野!’);

//example 3
$friends = $fetion->get_friends_list();
var_dump($friends);

?>

偶自己做的简单API应用:链接

Technorati 标签: ,

猜测您可以感兴趣的内容:

Leave a Reply


Spam Protection by WP-SpamFree

This site is protected by WP-CopyRightPro