Re: Executing Script through image
| From: | BB | Date: | Tue, 09 Jul 2002 13:07:21 +0000 |
| Subject: | Re: Executing Script through image | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-106348@lists.php.net to get a copy of this message | ||
$filename = "your/file.gif";
header("Content-Type: image/gif");
header("Content-length:".filesize($filename));
$fn=fopen($filename,"rb");
while(!feof($fn)) {
echo fread($fn, 4096);
}
in fopen( , "");
the b denotes to read as binary and is only nessecary on a windows system
"Jj Harrison" <webmaster@tececo.com> wrote in message
news:20020709125042.90160.qmail@pb1.pair.com...
> I am making a stats program.
>
> When the nessicary include file is included it does a reverse-DNS lookup
to
> find the remote host's DNS name. The problem with this is that is seems
> slow(at least on my test server with a DSL connection). I thought the best
> way to speed things up would be putting the entire script into a file and
> then using <img src="stats.php"> within the page. The problem is that I
> don't know how to output the image with PHP.
>
> The image would not be dynamic just a file on the server.
>
> I would appreciate peoples comments or other suggestions
>
> JJ Harrison
> webmaster@tececo.com
> www.tececo.com
>
>
>
>
>