Intercept image request
| From: | Eric Frost | Date: | Thu, 17 Nov 2005 01:07:09 +0000 |
| Subject: | Intercept image request | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-26499@lists.php.net to get a copy of this message | ||
I want to intercept an image request from other web sites, runs some PHP,
and then actually go ahead and serve the image request.
I have ISAPIRewrite installed so I put in this
RewriteRule /m.png /m.php
This part is fine.
To serve the image I tried --
<?
// do my php stuff
?>
<img src=m1.png>
I use m1.png so the request is not looping back on itself. :-)
It seems like this should work but it doesn't work from other web site. I
think because they are expecting a raw image.
So.. is this the way to go ? --
http://php.mirrors.ilisys.com.au/manual/en/function.imagepng.php
right in the PHP code run --
<?php
$im = imagecreatefrompng("test.png");
imagepng($im);
?>
for some reason I can't get it to work for the last few hours! Anyway, if
you could at least tell me if I'm on the right track I'll keep at it.
Thanks!
Eric
http://www.mp2kmag.com