• 06-02-2016, 19:30:49
    #1
    Üyeliği durduruldu
    merhaba

    türkiyeye kapalı bir siteden video çekecek bir bot hazırlamak istiyoruz fakat site türkiyeye kapalı olduğu için doğal olarak videolar gözükmüyor bu konu hakkında bir fikri olan yardım edebilir mi ?
  • 06-02-2016, 19:37:14
    #2
    Reveloper
    function _curl($url,$user_agent='Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)')
    {
    $ch = curl_init();
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);
    curl_setopt ($ch, CURLOPT_HEADER, 0);
    curl_setopt ($ch, CURLOPT_REFERER, 'http://www.google.com/');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
    curl_setopt($ch, CURLOPT_PROXY, '213.136.79.122:80');
    $data = curl_exec();
    curl_close($ch);
    return $result;
    }
    //Kullanımı
    echo _curl('youtube.com');
  • 07-02-2016, 15:47:23
    #3
    Üyeliği durduruldu
    Burti adlı üyeden alıntı: mesajı görüntüle
    function _curl($url,$user_agent='Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)')
    {
    $ch = curl_init();
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);
    curl_setopt ($ch, CURLOPT_HEADER, 0);
    curl_setopt ($ch, CURLOPT_REFERER, 'http://www.google.com/');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
    curl_setopt($ch, CURLOPT_PROXY, '213.136.79.122:80');
    $data = curl_exec();
    curl_close($ch);
    return $result;
    }
    //Kullanımı
    echo _curl('youtube.com');

    yardımcı olduğunuz için teşekkür ederim bir sorum daha olacaktı 213.136.79.122:80 buradaki proxyi neye göre tanımladınız hocam
  • 07-02-2016, 16:27:31
    #4
    farukyurtseven adlı üyeden alıntı: mesajı görüntüle
    yardımcı olduğunuz için teşekkür ederim bir sorum daha olacaktı 213.136.79.122:80 buradaki proxyi neye göre tanımladınız hocam
    çalışan bir yurtdışı proxysidir, kendiniz bu iş için yurtdışı bir vps kiralayıp onun üstünden yapabilirsiniz daha sağlıklı olur
  • 07-02-2016, 19:29:25
    #5
    Üyeliği durduruldu
    teşekkürler hocam