Intercept image request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux