1 2 3 4 5 6 7 8 9 10 11
| $ch = curl_init();
curl_setopt ($ch,CURLOPT_FRESH_CONNECT, 1);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'text='.$ing.'&h1=en&ie=UTF8');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt ($ch, CURLOPT_REFERER, "http://www.google.fr");
//curl_setopt ($ch, CURLOPT_USERAGENT, "Curl");
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101");
curl_setopt($ch, CURLOPT_URL, "http://www.google.com/");
$contenu=curl_exec($ch);
curl_close($ch); |
Partager