时间:2021-07-01 10:21:17 帮助过:26人阅读
http://112.78.104.13
1、http://112.78.104.13 是框架页。含有公共变量和函数
2、含登录框的框架是 http://112.78.104.13/app/member
3、表单目标页是 http://112.78.104.13/app/member/login.php
4、登录后返回
$url = 'http://112.78.104.13/app/member';$url1 = 'http://112.78.104.13/app/member/login.php';$d = array('username' => 'zm1000', 'passwd' => 'a123456');//echo file_get_contents($url);//print_r(get_headers($url));echo postdata($url1, $d);function postdata($url, $data){ $opts = array( 'http' => array( 'method' => 'POST', 'header' => 'content-type:application/x-www-form-urlencoded', 'user_agent' => $_SERVER['HTTP_USER_AGENT'], 'content' => http_build_query($data) ) ); $context = stream_context_create($opts); $result = file_get_contents($url, false, $context); return $result;}
1、http://112.78.104.13 是框架页。含有公共变量和函数
2、含登录框的框架是 http://112.78.104.13/app/member
3、表单目标页是 http://112.78.104.13/app/member/login.php
4、登录后返回
$url = 'http://112.78.104.13/app/member';$url1 = 'http://112.78.104.13/app/member/login.php';$d = array('username' => 'zm1000', 'passwd' => 'a123456');//echo file_get_contents($url);//print_r(get_headers($url));echo postdata($url1, $d);function postdata($url, $data){ $opts = array( 'http' => array( 'method' => 'POST', 'header' => 'content-type:application/x-www-form-urlencoded', 'user_agent' => $_SERVER['HTTP_USER_AGENT'], 'content' => http_build_query($data) ) ); $context = stream_context_create($opts); $result = file_get_contents($url, false, $context); return $result;}
我已经说了“数据是由 js 产生的”,自然就是 php 抓不到的了
我已经说了“数据是由 js 产生的”,自然就是 php 抓不到的了
JS的数据用PHP抓也不是不可能,只不过被对方发现了的话,这个程序的维护成本就增大
其?,?方一般不???,但???西要???才有人做。