<?
$url="http://www.feiin.com/registerForMobileForCode.act";
$header[]= 'Host: www.feiin.com';
$header[]= 'User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 Firefox/29.0';
$header[]= 'Accept: text/html, */*; q=0.01';
$header[]= 'Accept-Language: zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3';
$header[]= 'Accept-Encoding: gzip, deflate';
$header[]= 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8';
$header[]= 'X-Requested-With: XMLHttpRequest';
$header[]= 'Pragma: no-cache';
$header[]= 'Cache-Control: no-cache';
$header[]= 'Referer: http://www.feiin.com/registerMobile.act';
$header[]= 'Content-Length: 36';
$header[]= 'Cookie: JSESSIONID=50344644B83729659713B02F2FBF3458; Hm_lvt_e7db37c8969981b3edf8650c5fde1002=1399690013; Hm_lpvt_e7db37c8969981b3edf8650c5fde1002=1399692027; IESESSION=alive; pgv_pvi=5491908608; pgv_si=s2348562432; __utma=264577560.507214264.1399690018.1399690018.1399692027.2; __utmc=264577560; __utmz=264577560.1399690018.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmb=264577560.1.10.1399692027';
$header[]= 'Connection: keep-alive';
$curlPost='mobileNo=电话号码&smSecurityCode=';
$ch = curl_init(); //初始化curl
curl_setopt($ch, CURLOPT_URL, $url);//设置链接
curl_setopt($ch, CURLOPT_POST, 1);//post提交方式
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);//设置HTTP头
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //设置开启重定向支持
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true) ; // 获取数据返回
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true) ; // 在启用 CURLOPT_RETURNTRANSFER 时候将获取数据返回
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
$output = curl_exec($ch) ;
curl_close($ch);
?>
短信
最新推荐文章于 2022-03-05 20:08:17 发布