ProAnswers.org

How do you retrieve external web pages using PHP?

How do you retrieve external web pages using PHP?

Use the URL to open the resource as a stream (like you would open any local file by name)

 

$file = fopen("http://www.google.com/", "r");

fpassthru($file); // or fgets etc...

fclose($file);

 

see .