• 20-07-2019, 00:59:09
    #1
    Üyeliği durduruldu
    Bağlanmak istediğim site bu
    http://www.bloggernity.com/


    normal denedim, curl kullandım simple_html_dom kullandım ama bağlanamadım. yardımcı olabilecek biri var mı acaba

    verdiği hata bu "failed to open stream: Redirection limit reached, aborting in"
  • 20-07-2019, 01:13:31
    #2
    Hocam aşağıda ki kodu dener misiniz. Local de çalışıyorsanız sertifika hatası verirse cacert.pem dosyasına ihtiyacınız olabilir. Google ufak bi aramayla cacert.pem dosyasına da erişebilirsiniz.
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
    CURLOPT_URL => "http://www.bloggernity.com/",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    //CURLOPT_CAINFO => 'cacert.pem',
    CURLOPT_COOKIE => 'PHPSESSID=4o3c3d8n3h3vnj9ctpsgihgr45; path=/; domain=.www.bloggernity.com; Expires=Tue, 19 Jan 2038 03:14:07 GMT; region_id=tr; path=/; domain=.www.bloggernity.com; Expires=Sun, 18 Aug 2019 21:49:10 GMT; language_id=1%0D; path=/; domain=.www.bloggernity.com; Expires=Sun, 18 Aug 2019 21:49:10 GMT;',
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    }
  • 20-07-2019, 01:14:55
    #3
    Üyeliği durduruldu
    mikropiks adlı üyeden alıntı: mesajı görüntüle
    Hocam aşağıda ki kodu dener misiniz. Local de çalışıyorsanız sertifika hatası verirse cacert.pem dosyasına ihtiyacınız olabilir. Google ufak bi aramayla cacert.pem dosyasına da erişebilirsiniz.
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
    CURLOPT_URL => "http://www.bloggernity.com/",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "GET",
    //CURLOPT_CAINFO => 'cacert.pem',
    CURLOPT_COOKIE => 'PHPSESSID=4o3c3d8n3h3vnj9ctpsgihgr45; path=/; domain=.www.bloggernity.com; Expires=Tue, 19 Jan 2038 03:14:07 GMT; region_id=tr; path=/; domain=.www.bloggernity.com; Expires=Sun, 18 Aug 2019 21:49:10 GMT; language_id=1%0D; path=/; domain=.www.bloggernity.com; Expires=Sun, 18 Aug 2019 21:49:10 GMT;',
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
    echo "cURL Error #:" . $err;
    } else {
    echo $response;
    }
    çok teşekkür ediyorum. r10+
  • 20-07-2019, 01:18:22
    #4
    Rica ederim hocam cookie kısmını aşağıda ki gibi de yapabilirsiniz

    CURLOPT_COOKIE         => 'region_id=tr;',