oraribyrag1 Posted April 4, 2010 Share Posted April 4, 2010 I'd like to be able to make an image, that when viewed, that will execute a PHP script. How do I get started? Link to comment https://forums.phpfreaks.com/topic/197540-use-an-image-to-execute-a-php-script/ Share on other sites More sharing options...
Alex Posted April 4, 2010 Share Posted April 4, 2010 <?php readfile('path/to/file.png'); header('Content-type: image/png'); That PHP script outputs an image, you can add whatever you want to it. If you need an image extension you can change the file to *.png (or any other image extension) and use .htaccess to have PHP interpret that file. Link to comment https://forums.phpfreaks.com/topic/197540-use-an-image-to-execute-a-php-script/#findComment-1036754 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.