Benim web barındırma sadece engelli fopen ()
Benim komut dosyası açın ve sunucu üzerindeki bir metin dosyasına yazmak için kullanılan, ama artık yapamam.
Fopen alternatif bir işlevi var mı?
You might be able to do it with fsockopen(). For me this worked:
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "GET / HTTP/1.1\r\n";
$out .= "Host: www.example.com\r\n";
$out .= "Connection: Close\r\n\r\n";
fwrite($fp, $out);
while (!feof($fp)) {
echo fgets($fp, 128);
}
fclose($fp);
}
Host ve istek parametreyi değiştirmek unutmayın
I cURL allow_url_fopen
to be enabled. However, the cURL extension must be installed. Use phpinfo()
a> yüklüyse kontrol gerektirir sanmıyorum.
Biraz daha gelişmiş normal daha var fopen()
veya file_get_contents()
ama kesinlikle bir alternatiftir.