Pouzivam nasledujici kod. Bohuzel se mi podarit pres proxy nepodari. Zprovoznuji to na nejakem splacanem linuxovem serveru. Je nejake snadne jine reseni narpiklad stahnuti hlavicky nejake stranky skrze proxy? Potrebuji to na zitrek totiz do skoly. DIKY!
function curl_retezec ($url,$user_agent){
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, TRUE) ;
curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
//curl_setopt($ch, CURLOPT_HTTPHEADER, array("Pragma: "));
curl_setopt ($ch, CURLOPT_PROXY, "165.228.130.10");
curl_setopt ($ch, CURLOPT_PROXYPORT, "3128");
//curl_setopt ($ch, CURLOPT_PROXYPWD, "xslaj28:rumburak1");
//curl_setopt ($ch, CURLOPT_PROXY, "cache.vse.cz:8080");
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt ($ch, CURLOPT_HEADER, 0);
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://library.vse.cz/aleph";
$user_agent = "Mozilla/5.0";
$retezec = curl_retezec($url_page,$user_agent);