Maison >développement back-end >tutoriel php >PHP免费发送短信代码(利用中国移动飞信)(1/3)_PHP教程
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);
}
}
?>
无标题文档
1 2 3