Using the filename for GET data and making the PHP page output as a JPG extension?
Posted
by Rob
on Stack Overflow
See other posts from Stack Overflow
or by Rob
Published on 2010-05-20T15:03:59Z
Indexed on
2010/05/20
15:30 UTC
Read the original article
Hit count: 227
Alright, currently I'm using GD
to create a PNG image that logs a few different things, depending on the GET data, for example: http://example.com/file.php?do=this
will log one thing while http://example.com/file.php?do=that
will log another thing.
However, I'd like to do it without GET data, so instead http://example.com/dothis.php
will log one thing, and http://example.com/dothat.php
will log the other.
But on top of that, I'd also like to make it accessible via the JPG file extension. I've seen this done but I can't figure out how. So that way http://example.com/dothis.JPG
will log one thing, while http://example.com/dothat.JPG
logs the other.
The logging part is simple, of course. I simple need to know how to use filenames in place of the GET data and how to set the php file to be accessible via a jpg file extension.
© Stack Overflow or respective owner