21,887
社区成员
发帖
与我相关
我的任务
分享
if(msg.status==200){
count=1;
document.getElementById('smsvalDIV').style.display='block';
$('#smsRandomCode').focus();
這一句就是显示出验证码的那个div的,你只需要手工用firebug修改一下下边这个div的display就能提前看到层了,接下来你可以先获取验证码的部分.
<div class="append_parent" id="smsvalDIV" style="display: none;">
curl发送数据的时候要用 post方式
Public Function __construct($u) {
IF($u=='') {Return '';}
$this->url=&$u;
$r = parse_url($this->url);
$Cai = curl_init();
$Opt = Array(
CURLOPT_URL => $this->url,
CURLOPT_REFERER => $r['scheme'].'://'.$r['host'],
CURLOPT_FAILONERROR => 1,
CURLOPT_FOLLOWLOCATION => 1,
CURLOPT_RETURNTRANSFER => 1,// 获取的信息以檔案流的形式返回,而不是直接输出。
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_VERIFYHOST => 1,// 从证书中检查SSL加密算法是否存在
CURLOPT_SSL_VERIFYPEER => 0,// 对认证证书来源的检查,0表示阻止对证书的合法性的检查
//偽造來路和IP
//CURLOPT_REFERER => 'http://www.yzswyl.cn/', //来路
//CURLOPT_HTTPHEADER => Array('X-FORWARDED-FOR:8.8.8.8', 'CLIENT-IP:8.8.8.8'),
//CURLOPT_HEADER => 1,
//CURLOPT_PROXY => '222.73.173.50:8080',
//CURLOPT_PROXYUSERPWD => 'username:password',
//CURLOPT_PORT => 80, //端口
//CURLOPT_POST => 1, //发送一个常规的POST请求,类型为:application/x-www-form-urlencoded,就像表单提交的一样。
//CURLOPT_POSTFIELDS => $postfields,//要传送的所有数据,如果要传送一个檔案,需要一个@开头的檔案名('g=yes&username=see7di&password=www.7di.net999&id=&code=')
//CURLOPT_COOKIE => GetCook($url),
//CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1',
//CURLOPT_COOKIEJAR => Dirname(__FILE__).$cookie_jar,
//CURLOPT_COOKIEFILE => Dirname(__FILE__).$cookie_jar,
);
curl_setopt_array($Cai,$Opt);
$this->html = curl_exec($Cai);
IF(!$this->html){
$this->html='<br>Error number: '.curl_errno($Cai).'<br>Error: '.curl_error($Cai);
curl_close($Cai);
Return $this->html;
}
curl_close($Cai);
}
捕捉了一下他的頭
ResponseHeaders
Date Thu, 13 Dec 2012 07:06:54 GMT
X-Powered-By Servlet/3.0
P3P CP=CAO PSA OUR
Content-Length 80
Server WebSphere Application Server/8.0
Content-Language en-US
Content-Type text/html;charset=utf-8
RequestHeaders
Content-Type application/x-www-form-urlencoded
X-Requested-With XMLHttpRequest
Accept application/json, text/javascript, */*