2013-08-16 1 views
-1

J'ai un code php pour obtenir captcha youtube mais quand je soumets captcha Rien ne se passera.cURL- comment soumettre youtube captcha en utilisant cURL

<?php 
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, 'http://www.youtube.com/das_captcha?next=/'); 
curl_setopt($ch, CURLOPT_NOBODY, false); 
curl_setopt($ch, CURLOPT_COOKIEJAR, 'session.ck'); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false); 
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); 
curl_setopt($ch, CURLOPT_TIMEOUT, 45); 
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13 GTB7.1'); 

$a = curl_exec($ch); 
if(preg_match('#Location: (.*)#', $a, $r)){ 
$l = trim($r[1]); 

} ?> 

Quelqu'un peut-il me conseiller

Répondre

0

Vous n'avez pas. Le but du captcha est de limiter l'accès aux humains en utilisant les navigateurs web et de bloquer les outils automatisés comme celui que vous essayez d'écrire.

Utilisez plutôt the APIs provided.