I found a PHP script in a GIF file -


Is it possible for a PHP script to be inside a GIF file? I found one when I opened a .gif file in Notepad ++.

Actually, there are some things that are possible (and usually used for things like hit counters

Consider this:

  & lt; Img src = "myPicture.php" />  

myPicture.php can look like this:

   

So, your PHP script's Outlook is not ASCII text (or HTML), it's a binary of a .png file. Thus the header () is set to point to this, and the imagepang () function actually produces raw PNG image data. (For example, has been raised).

Another option, which others have mentioned, includes a "normal" image tag:

    

Notice ends in ".png" In this situation, the web server must be configured so that it not only parsed .php files in executable PHP code, Rather, the PNG files can also be. Your code will look the same, but it will be wrapped in "myPicture.png" instead of ".php"


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -