您的位置:首页 > 编程语言 > PHP开发

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: