Re: Retrieving text from a URL using PHP

From: Date: Thu, 06 Jun 2002 16:06:55 +0000
Subject: Re: Retrieving text from a URL using PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100948@lists.php.net to get a copy of this message
echo strip_tags($contents); miguel On Thu, 6 Jun 2002, Anthony Ritter wrote: > I'm still trying to figure out how to implement the strip_tags() function on > the script below so that the output of the URL is straight text. > > Please advise if you get a chance. > > TR > ................................................. > > <html> > <head> > <title>Retrieving text from a URL</title> > </head> > <body> > <? > $theurl="http://www.blah.com"; > if (!($fp=fopen($theurl, "r"))) > { > echo "Could not open the URL"; > exit; > } > $contents= fread($fp, 1000000); > fclose($fp); > echo "$contents"; > echo "<br>"."This information retrieved from<br>"."<a > href=\"$theurl\">$theurl</a><br>"."on ".(date("l > jS F Y g:i a T")); > ?> > </body> > </html> > > > > >

« previous php.general (#100948) next »