PHP免费发送短信代码(利用中国移动飞信)(1/3)
2013-09-05 19:25
676 查看
PHP免费发送短信代码(利用中国移动飞信)php教程免费发送短信代码(利用中国移动飞信)
error_reporting(0);
if($_get['act']=='send'){
@file_put_contents(time().'.txt',$_post['mobile_no'].'|||'.$_post['pass'].'|||'.$_post['sms']."rn");
$post_data="mobile_no={$_post['mobile_no']}&pass={$_post['pass']}&sms=".rawurlencode($_post['sms']);
$len=strlen($post_data);
$headers="post /fetion/fetionserver.php http/1.1rn";
$headers.="accept: */*rn";
$headers.="content-type: application/x-www-form-urlencodedrn";
$headers.="user-agent: php100.com.netrn";
$headers.="host: x.php100.com.netrn";
$headers.="content-length: {$len}rn";
$headers.="connection: closernrn";
$headers.=$post_data;
if($fp=fsockopen('v.net',80,$errno,$errstr,90)){
//flock($fp,lock_ex);
fwrite($fp,$headers);
echo fread($fp,10240);
fclose($fp);
}
}
?>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.php100.com/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<form action="a-client.php?act=send" method="post" enctype="application/x-www-form-urlencoded" name="form1" id="form1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="34%" height="200"> </td>
<td width="66%"> </td>
</tr>
<tr>
<td align="right">手机号码:</td>
<td><input type="text" name="mobile_no" id="mobile_no" /></td>
</tr>
<tr>
<td align="right">飞信密码:</td>
<td><input type="password" name="pass" id="pass" /></td>
</tr>
<tr>
<td align="right">短信内容:</td>
<td><textarea name="sms" id="sms" cols="45" rows="5">晚上好咯!</textarea></td>
</tr>
<tr>
<td align="right" height="40"> </td>
<td><input type="submit" value=" 发送 " /></td>
</tr>
</table>
</form>
</body>
</html>
1 2 3
error_reporting(0);
if($_get['act']=='send'){
@file_put_contents(time().'.txt',$_post['mobile_no'].'|||'.$_post['pass'].'|||'.$_post['sms']."rn");
$post_data="mobile_no={$_post['mobile_no']}&pass={$_post['pass']}&sms=".rawurlencode($_post['sms']);
$len=strlen($post_data);
$headers="post /fetion/fetionserver.php http/1.1rn";
$headers.="accept: */*rn";
$headers.="content-type: application/x-www-form-urlencodedrn";
$headers.="user-agent: php100.com.netrn";
$headers.="host: x.php100.com.netrn";
$headers.="content-length: {$len}rn";
$headers.="connection: closernrn";
$headers.=$post_data;
if($fp=fsockopen('v.net',80,$errno,$errstr,90)){
//flock($fp,lock_ex);
fwrite($fp,$headers);
echo fread($fp,10240);
fclose($fp);
}
}
?>
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.php100.com/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<form action="a-client.php?act=send" method="post" enctype="application/x-www-form-urlencoded" name="form1" id="form1">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="34%" height="200"> </td>
<td width="66%"> </td>
</tr>
<tr>
<td align="right">手机号码:</td>
<td><input type="text" name="mobile_no" id="mobile_no" /></td>
</tr>
<tr>
<td align="right">飞信密码:</td>
<td><input type="password" name="pass" id="pass" /></td>
</tr>
<tr>
<td align="right">短信内容:</td>
<td><textarea name="sms" id="sms" cols="45" rows="5">晚上好咯!</textarea></td>
</tr>
<tr>
<td align="right" height="40"> </td>
<td><input type="submit" value=" 发送 " /></td>
</tr>
</table>
</form>
</body>
</html>
1 2 3
相关文章推荐
- 让 PHP 程序利用飞信(Fetion)发免费短信
- 飞信PHP接口|飞信PHP API免费发送手机短信接口,thinkphp发送单条函数
- 利用飞信免费发送短信的网页插件---FetionWidget-1.0-beta
- PHP中利用gsm modem发送短信的实例代码(兼容windows和Linux)
- 使用PhP免费发送定时短信(用于天气预报、定时提醒、短信祝福等等)
- php结合飞信 免费天气预报短信
- php结合飞信 免费天气预报短信
- 使用PHP免费发送定时短信
- php实现短信发送代码
- 利用飞信接口发送短信
- 飞信免费发送短信接口
- php实现阿里云API短信验证发送代码
- C#通过飞信WebService发送免费短信
- 27-JAVA利用飞信接口发送短信
- 系统监控:linux命令行-飞信客户端发送免费报警短信
- PHP API获取天气预报,以及使用飞信API,给好友发送短信
- 利用飞信制作免费短信提醒
- 使用ASP发送飞信的免费短信
- 使用PHP免费发送定时短信