<?php function do_post_request($url, $data, $optional_headers = null) { $params = array('http' => array( 'method' => 'POST', 'content' => $data )); if ($optional_headers !== null) { $params['http']['header'] = $optional_headers; } $ctx = stream_context_create($params); $fp = @fopen($url, 'rb', false, $ctx); if (!$fp) { throw new Exception("Problem with $url, $php_errormsg"); } $response = @stream_get_contents($fp); if ($response === false) { throw new Exception("Problem reading data from $url, $php_errormsg"); } return $response; } $a= do_post_request("http://www.ylsyzx.net/seek.asp?action=seek","bb=班别号&ks=考试类别"); echo $a; ?>
老虎会告诉你源码
http://hu60.cn/wap/read.php?url=http%3A%2F%2Fwww.ylsyzx.net%2Fseek.asp&code=GBK&go=%E7%9C%8B%E6%BA%90%E7%A0%81&id=ym
提交地址:http://www.ylsyzx.net/seek.asp?action=seek
班级地址:bb=
时间:&ks=
post请求
请求的信息都是以GBK字节集