我有这个脚本,allow_url_fopen = On
这不是一个好主意,我想改变curl
。如果有人可以帮助我解决如何操作,我将不胜感激fputs GET
。
$SH = fsockopen($IP, $Port, $errno, $errstr, 30);
echo $errstr;
#$ch = curl_init();
#curl_setopt($ch, CURLOPT_TIMEOUT, 30);
#curl_setopt($ch, CURLOPT_URL, $IP.":".$Port);
#curl_setopt ($ch, CURLOPT_HEADER, 0);
if ($SH){
fputs($SH,"GET /7.html HTTP/1.0\r\nUser-Agent: S_Status (Mozilla Compatible)\r\n\r\n");
$content = "";
while(!feof($SH)) {
$content .= fgets($SH, 1000);
#content .= curl_setopt($ch, CURLOPT_FILE, $SH);
}
fclose($SH);
#curl_close($ch);
}