Retourner au contenu associé (dépêche : HP: un super ordinateur sous Linux)
Posté par Def le 19 avril 2002 à 10:16. En réponse à la dépêche HP: un super ordinateur sous Linux. Évalué à 2.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: à ce sujet
Posté par Def . En réponse à la dépêche HP: un super ordinateur sous Linux. Évalué à 2.
use LWP::UserAgent;
use HTTP::Request::Common;
$ua = new LWP::UserAgent();
$total = 0;
$motcle="hp";
$delay = 1; #Delay entre les requêtes
# Si besoin est
#$ua->proxy('http','http://proxy:8080'(...));
$ua->agent('Mozilla/5.0');
while (true) {
$resp = $ua->request(GET
"http://www.google.fr/"(...));
$resp = $ua->request(GET
"http://www.google.fr/search?q=".$motcle."&btnG=Google(...));
$total++ if ( $resp->{_content} =~ /wstore/ );
print "Et ".$total." requête(s)\n";
sleep($delay);
}