• 20-06-2009, 01:59:54
    #10
    S4l1h adlı üyeden alıntı: mesajı görüntüle
    dream host allow_fopen_url ' Değeri off ondan dolayı izin vermiyor
    Onun yerine Curl İle Yap Bu İşi
    function dosya_indir($feed){
            $ch = curl_init();
            $timeout = 0;
            curl_setopt ($ch, CURLOPT_URL, $feed);
            curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
            $veri= curl_exec($ch);
            curl_close($ch);
            return $veri;
        }
    arkadaşım bende dreamhost kullanıyorum.. file_get_contents sorun çıkartıyor..
    bu şekilde curl ile rahatlıkla çekebilrsin..
    dreamhost kullandığım için bu cevabı tekrarlıyorum.
  • 01-07-2010, 19:19:43
    #11
    S4l1h adlı üyeden alıntı: mesajı görüntüle

    function dosya_indir($feed){
            
            
            $ch = curl_init();
            $timeout = 0;
            curl_setopt ($ch, CURLOPT_URL, $feed);
            curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
            $veri= curl_exec($ch);
            curl_close($ch);
            
            return $veri;
    
        }
    Kullanımı

    dosya_indir("http://www.youtube.com/index.php")
    Şeklinde
    Bu kod çok işime yaradı çok teşekkür ederim.
    file_get_contents ile veri çekiyordum ama bazen sayfa geciktiği zaman boş değer yazdırıyor.
  • 10-03-2013, 13:00:16
    #12
    yukarıda ki kodları denediğimde de bu hayatı alıyorum ?

    Warning: file_get_contents(http://www.*******.com) [function.file-get-contents]: failed to open stream: HTTP request failed! in C:\wamp\www\blogbot\blogbot\index.php on line 13