http://139.196.234.129:8888/sms.aspx?";
$curlPost = "action=send&userid=85&account=短信平台账号&password=短信平台密码&mobile={$Phone}&content={$content}&sendTime=&extno=";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);//抓取指定网页
curl_setopt($ch, CURLOPT_HEADER, 0);//设置header
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //要求结果为字符串且输出到屏幕上
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); //允许curl提交后,网页重定向
curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
$data = curl_exec($ch);//运行curl
if($data){
$_SESSION['PhoneCode']=$crdo;
echo 1;
}else{
echo 0;
}
}else{
echo 0;
}
}
//手机验证
public function phoneVerification(){
if($_POST['Pcode']==$_SESSION['PhoneCode']){
echo 1;
}else{
echo 0;
}
}
?>