[php]代码库
<?php
$url = "http://106.ihuyi.cn/webservice/sms.php?method=Submit";端口地址
$post_data = array (
"method" => "Submit",
"account" => "",//用户名
"password" => "",//密码
"mobile" => "",//电话号码
"content" => "您的验证码是:7857。请不要把验证码泄露给其他人。"//内容
);
var_dump($post_data);
function Post($post_data,$url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_NOBODY, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);
$return_str = curl_exec($curl);
curl_close($curl);
return $return_str;
}
var_dump(Post($post_data,$url));
?>