I need to display files through a PHP script. I made me a script named files.php. I call the files as files.php?id=123213 for example.
I get the file to display, or download - regarding if it's an image or not. For images, the image is displayed, but the name of the image is "files.php", if you do a save as you get "files.php.jpg", and i want it to be "something_else.jpg".
I set header("Content-Disposition: attachment; filename='something_else.zip'"), and it works great, for files i want to download.
For images i just want them to display with proper name. Tried header("Content-Disposition: inline; filename='something_else.jpg'") - doesn't work :(
Thanks in advance.