2011-12-09 7 views
0

おはよう、プロキシサーバーのcURLコンテンツ

URLから内容を取得するスクリプトがあります。私はこれにcURLを使用しました。しかし、私はhttp://www.canadaproxy.net/のようなプロキシサーバーからコンテンツを取得したかったので、スクリプトの戻り値がないようです。ここで

は私のPHPコードです:

$url = "http://www.canadaproxy.net/browse.php?u=Oi8vd3d3Lmdvb2dsZS5jYS8%3D&b=5";
$timeout = 5;
$useragent = "Googlebot/2.1 (http://www.googlebot.com/bot.html)";
$ch = curl_init();
curl_setopt ($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$raw = curl_exec($ch);


curl_close($ch);

var_dump($raw);

任意の提案を大幅に理解されるであろう。

ありがとうございます!

答えて

1

URLは次のとおりです。$ url = "http://www.canadaproxy.net/includes/process.php?action=update";それは働いていた

+0

curl_setopt($ch,CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($ch,CURLOPT_POST, true); curl_setopt($ch,CURLOPT_POSTFIELDS, "u=google.com"); 

を追加し、それが動作します!どうもありがとうございました! – acidpaul

関連する問題