Tea Forums & Tea Industry Forum - Debt Consolidation - Debt Consolidation - Web Advertising - Valentine Gifts

PDA

View Full Version : Calling PHP through an image?


arbos
May 8th 2006, 12:41 pm
I've seen this more and more lately. Whether it be PNG, or JPEGS people are calling what looks like to be a PHP file or some other type of script through an image.

For example something like this
<a href="http://www.example.com/" target="_blank">
<embed src="http://www.example.com/x/sample.jpg" border="0" height="0" width="0">
</a>

How does something like this work?

frisby
May 8th 2006, 12:49 pm
Here you don't call any php code... :rolleyes:

madkad
May 8th 2006, 12:53 pm
do you mean them images that show info on but are images?

like the ones that say your ip etc etc

Nikolas
May 8th 2006, 1:04 pm
Here you are :


header("Accept-Ranges: bytes");
header("Cache-Control:");
header("Pragma:");
header("Content-Length: $len");
header("Connection: close");
header("Content-Type: image/png");
header("Content-Disposition: inline; Filename=image.png");
readfile($IMAGE);

piniyini
May 8th 2006, 3:47 pm
Does the image have to be png?

Nikolas
May 8th 2006, 4:00 pm
You can use whatever you like.

Just change the headers and the filename (actually the filename is not neccesery but it may be needed by some browsers)

arbos
May 8th 2006, 4:34 pm
You can use whatever you like.

Just change the headers and the filename (actually the filename is not neccesery but it may be needed by some browsers)

Thanks this is what I figured.

For the people that didn't clearly get what I asked I'll try and explain it again...sorry for the mess up there.

Basically fooling the page into thinking you are calling an image file when it really is running a PHP script. It's something I see being done on alot of trackers...and just wondered how it was done.