Kod:
<?php function curl_string ($url,$user_agent,$proxy){ $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt ($ch, CURLOPT_COOKIE, 'c:cookie.txt'); curl_setopt ($ch, CURLOPT_HEADER, 1); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($ch, CURLOPT_TIMEOUT, 120); $result = curl_exec ($ch); curl_close($ch); return $result; } $url_page = \"http://www.google.pl/search?hl=pl&q=w%C3%B3zki&btnG=Szukaj+w+Google&lr=\"; $user_agent = \"Mozilla/4.0\"; $string = curl_string($url_page,$user_agent,$proxy); ?>
Cookie:
Kod
PREF
ID=10e32df70aadcf9b:LD=pl:NR=100:TM=1122887481:LM=1123066970:S=AVD6WJsW68pml6ax
google.pl/
1536
2618878336
32111634
3754281184
29726746
*
ID=10e32df70aadcf9b:LD=pl:NR=100:TM=1122887481:LM=1123066970:S=AVD6WJsW68pml6ax
google.pl/
1536
2618878336
32111634
3754281184
29726746
*
Jak poprawnie wysłać cookie do serwera google symulując przeglądarkę?