Apache is also open source which means that anybody with the motivation and know-how can modify the source and compile a custom 'version' of apache that will handle anything any way you want it to. The HTTP requests are being handled by apache and that is where it would make the most sense to implement a filtering system if one was so desired.And I told you that they use PHP, not Apache. Because Apache is a server and does not handle anything but requests and that it is PHP that handle this implementation.
You forgot the .htaccess, something that (I think) is native to Apache. There might be a way to emulate the desired outcome on an IIS box but without letting the server know that it has to interpret that image as a script (by forcing the MIME type association), it's still going to handle it as an image (which is why you are getting that broken-image image). For the end-user that 'image' is never going to seem like anything but an image, but the server can still handle it as something else if it's told to do so.Okay. So I took your script. Loaded it into my ISS website via PHP through Fast CGI - http://www.php.net/m...ndows.iis7.php.
I then created test.php using the php you provided (Skipping those retarded [php] tags, and changing the image to image.gif I assuming thats what you -really- meant). I then made image.gif using a text editor and put in just that code. This is assume that you wanted it implemented this way. If its not, please correct me.