use curl. You can make post, etc
function curl_string ($url,$user_agent){
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt ($ch, CURLOPT_HTTPHEADER, 1);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_COOKIEJAR, "C:\cookie.txt");
curl_setopt ($ch, CURLOPT_COOKIEFILE, "C:\cookie.txt");
curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
$result = curl_exec ($ch);
curl_close($ch);
return $result;
}
this get a page into a string using cookies pretending to be a user agent
You can make post etc, see
http://www.php.net/manual/en/function.curl-setopt.php
To get a page from trow a proxy, I have submited a function to php.net
see this page:
http://www.php.net/manual/en/ref.curl.php (sorin)