Re: fread()

From: Date: Mon, 21 Feb 2005 13:46:06 +0000
Subject: Re: fread()
Groups: php.db 
Request: Send a blank email to php-db+get-38629@lists.php.net to get a copy of this message
At 11.12 21/02/2005, you wrote:
Hi All, I'd just like to know if it is possible to use fread to read the html content of a serverside coded page....as in something like this:
In theory yes, but if you want to read the html content after php processing you should use: $filename = "http://localhost/path/to/something.php"; PHP Streams will do the rest. Regards Edoardo Serra
<?php $filename = "/usr/local/something.php"; $handle = fopen($filename, "r"); $contents = fread($handle, filesize($filename)); fclose($handle); ?> --------------------------------- A passion till tomorrow, Opeyemi Obembe | ng.clawz.com --------------------------------- Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term'


« previous php.db (#38629) next »