中國移動飛信免費發簡訊API介面(第三方)

2021-04-26 08:50:08 字數 2717 閱讀 2534

http://sms.api.bz/fetion.php?username=您的移動飛信登入手機號&password=您的移動飛信登入密碼&sendto=接收簡訊的飛信好友手機號(也可以是你自己的手機號)&message=簡訊內容

注:簡訊內容最大長度為180個漢字,超過180個漢字不傳送。返回的資訊為utf-8編碼的中文文字資訊。

例1:在linux命令列下通過curl命令給自己的手機號(假設為13800138000)傳送簡訊

curl "http://sms.api.bz/fetion.php?username=13800138000&password=123456&sendto=13800138000&message=簡訊內容"

例2:在php5中通過file_get_contents函式傳送簡訊(http get 方式)

view plain

print?

<?php  

$url = "http://sms.api.bz/fetion.php?username=13812345678&password=123456&sendto=13512345678&message=簡訊內容";  

$result = file_get_contents($url);  

echo

$result; //返回資訊預設為utf-8編碼的漢字,如果你的頁面編碼為gb2312,請使用下行語句輸出返回資訊。

//echo iconv("utf-8", "gbk", $result);

?>  

例3:在php中通過curl傳送簡訊(http post 方式)

view plain

print?

<?php  

$data["username"] = 13812345678;  

$data["password"] = "password123";  

$data["sendto"] = 13512345678;  

$data["message"] = "這是一條測試簡訊!";  

$result; //返回資訊預設為utf-8編碼的漢字,如果你的頁面編碼為gb2312,請使用下行語句輸出返回資訊。

//echo iconv("utf-8", "gbk", $result);

//curl類

//是否顯示頭部資訊

curl_setopt($ch, curlopt_header, false);  

//curl_setopt($ch, curlopt_returntransfer, true);  

if ($username != '')  

$method = strtolower($method);  

if ('post' == $method)  

$fields = implode('&',$sets);  

}  curl_setopt($ch, curlopt_postfields, $fields);  

}  else

if ('put' == $method)  

//curl_setopt($ch, curlopt_progress, true);

//curl_setopt($ch, curlopt_verbose, true);

//curl_setopt($ch, curlopt_mute, false);

curl_setopt($ch, curlopt_timeout, 10);//設定curl超時秒數

中國移動飛信免費發簡訊API介面(第三方)

飛信 提供的 api 介面,即可免費給飛信好友發簡訊。利用本api介面可進行日程提醒 伺服器監控 報警 故障通知或簡訊自動控制等功能。fetion.php?username 您的移動飛信登入手機號 password 您的移動飛信登入密碼 sendto 接收簡訊的飛信好友手機號 message 簡訊內...

PHP免費發簡訊飛信類實現

index.php require phpfetion.php fetion new phpfetion 18801628027 手機號 飛信密碼 fetion send 18801628027 hello 接收人手機號 飛信內容 phpfetion.php php飛信傳送類 author quan...

中國移動飛信介面

飛信,客戶端 可能是vc做的 與移動的簡訊閘道器直接通訊做的。你也可以按照如下方式試一下,特別容易 可以自己註冊乙個測試帳戶 基於http協議的開發介面,令您可以很容易的將簡訊整合到您的系統。api開發介面格式如下 型別 get 方式 引數 uid id pwd 密碼 mobile 手機號 msg ...