[PHP] comment copier une page web en local

Fermé
Nico - 5 mai 2006 à 11:40
 Nico - 5 mai 2006 à 14:50
Bonjour à tous.

Voila, je souhaiterai pouvoir copié une page web en local.
Voici l'exemple :
comment copier la page d'index de google (www.google.fr) dans un fichier google.html en local sur ma machine ?

Merci d'avance pour vos pistes.
A voir également:

1 réponse

Pour compléter mon message, j'ai fait ceci :

$rh = fopen("http://www.monsite.com?var=toto", 'rb');
$wh = fopen("/tmp/toto.html", 'wb');
if ($rh===false || $wh===false) {
// error reading or opening file
return true;
}
while (!feof($rh)) {
if (fwrite($wh, fread($rh, 1024)) === FALSE) {
return true;
}
}
fclose($rh);
fclose($wh);


Ce code, me copie bien ma page http://www.monsite.com dans toto.html, mais sans prendre en compte ma variable GET (var=toto)

Comment faire ?
0