0
我有這個腳本,需要allow_url_fopen = On
這不是一個好主意,我想更改curl
。我會很感激,如果任何人可以幫助我如何做fputs GET
。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);
}
你能否聲明一個具體的問題? – DrDol 2011-02-19 00:54:27