• 28-09-2017, 09:55:37
    #1
    arkadaşlar kendi lokalimde çalışırken yazmış olduğum file_get_contents komutuyla https bir sitenin içeriğini çekemiyorum ekranda karşılaştığım hata

    Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\AppServ\www\bot\index.php on line 2
    Warning: file_get_contents(https://www.siteminadi.com/): failed to open stream: Invalid argument in C:\AppServ\www\bot\index.php on line 2
    yardımcı olursanız sevinirm.
  • 28-09-2017, 10:04:16
    #2
    php sürümünüzün openssl package ını ekleyin ve apacheyi resetleyin hocam.
  • 28-09-2017, 13:51:24
    #3
    chemochan adlı üyeden alıntı: mesajı görüntüle
    arkadaşlar kendi lokalimde çalışırken yazmış olduğum file_get_contents komutuyla https bir sitenin içeriğini çekemiyorum ekranda karşılaştığım hata

    Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\AppServ\www\bot\index.php on line 2
    Warning: file_get_contents(https://www.siteminadi.com/): failed to open stream: Invalid argument in C:\AppServ\www\bot\index.php on line 2
    yardımcı olursanız sevinirm.
    denermisin
    function curl($url, $post=false)
    {
        $user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6';
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, $post ? true : false);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $post ? $post : false);
        curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
        $icerik = curl_exec($ch);
        curl_close($ch);
        return $icerik;
    }
    
    $veri = curl('https://www.siteminadi.com/');