<?php<BR>function http_open($url, $data, $cookie = null, $method = "GET", $timeout = 60) {<BR> $options = array();<BR> $options['http']['method'] = $method;<BR> $options['http']['user_agent'] = $_SERVER['HTTP_USER_AGENT'];<BR> $options['http']['timeout'] = $timeout;<BR> if($method == "POST") : <BR> $length = strlen($data);<BR> $options['http']['header'] = "Content-type: application/x-www-form-urlencoded\r\n".<BR> "Content-Length: {$length}\r\n".<BR> "P3P: CP=\"CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR\"\r\n".<BR> "cookie: {$cookie}\r\n".<BR> "Connection: close\r\n";<BR> $options['http']['content'] = $data;<BR> else:<BR> $options['http']['header'] = "Content-type: application/x-www-form-urlencoded\r\n".<BR> "P3P: CP=\"CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR\"\r\n".<BR> "cookie: {$cookie}\r\n".<BR> "Connection: close\r\n";<BR> endif;<br><br> $context = stream_context_create($options);<BR> return file_get_contents($url, 0, $context);<BR>}<BR>echo http_open("http://localhost/1.php", "username<div>……本2文来源gaodai.ma#com搞##代!^码@网3</div><code>搞代gaodaima码</code>=haowei", "id=5", "POST");<BR>