Re: Intercept image request

From: Date: Thu, 17 Nov 2005 03:25:24 +0000
Subject: Re: Intercept image request
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-26500@lists.php.net to get a copy of this message
This did the trick -- http://john.ellingsworth.org/?p=18 Thanks John! My php code ended up being -- <? // bunch of stuff header("Content-type: image/png"); $path = "c:/websites/mp2kmag/m1.png"; //OPEN THE IMAGEFILE $mypng = fopen($path,"r"); //READ THE IMAGEFILE $image = fread($mypng,filesize($path)); //SEND IT DOWN THE PIPE echo $image; ?> My rewrite rule using Helicon's ISAPIrewrite is RewriteRule /m.png /m.asp So when you open this image -- http://www.mp2kmag.com/m.png it runs the code and then ends up serving http://www.mp2kmag.com/m1.png (again just because I didn't want the rewrite to loop back on itself). Thanks, Eric http://www.linkbliss.com http://www.ericfrost.com

« previous php.windows (#26500) next »