Re: grabbing content of a web page...

From: Date: Thu, 27 Jun 2002 21:11:41 +0000
Subject: Re: grabbing content of a web page...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104213@lists.php.net to get a copy of this message
You can also do this: <?php // get a web page into an array and print it out $fcontents = file ('http://www.example.com/'); while (list ($line_num, $line) = each ($fcontents)) { echo "<b>Line $line_num:</b>; ", htmlspecialchars ($line), "<br>\n"; } // get a web page into a string $fcontents = implode ('', file ('http://www.example.com/')); ?> PHP.net example always RTM... B i g D o g ----- Original Message ----- From: "Kelly Meeks" <info@rightangleinc.com> To: <php-general@lists.php.net> Sent: Thursday, June 27, 2002 1:53 PM Subject: [PHP] grabbing content of a web page... Howdy, I know there has to be a way to grab output of an url on another site? Let's say you wanted to get the output of yahoo.com (just for example)? Is there any way you can stick that into a variable, and then manipulate it? Thanks, Kelly

« previous php.general (#104213) next »