View Full Version : MIME Types
mr_ego
09-27-2002, 04:35 AM
I need a PHP script that will insert a picture that is
below the root directory of the webserver.
I need to do this with MIME types...
if cookie exists
if the cookie exists..
print the picture from the mime
[image name = $_GET['userid']]
[NOT <img src=>]
Else...
print picture "error.gif"
End If
End If
SYP}{ER
09-27-2002, 01:05 PM
Huh?
mr_ego
09-29-2002, 01:36 PM
i dont want people to have access to certain files directly
[eg: images]
i want PHP to MIME itself as an IMAGE image/png or image/jpeg below the root directory of the webserver.
how can you do this?
[i know it can be done with PERL and ASP]
mr_ego
10-03-2002, 02:25 PM
Please?
mordred
10-03-2002, 03:32 PM
I have troubles understanding what you mean with "PHP to MIME itself as an IMAGE image/png". PHP is a scripting language, so what exactly do you want PHP to do? Shall PHP think of itself as an image (for that is what I literally got from your description), would that be useful?
Anyway, I suspect you will find these two functions tremendously helpful:
http://us.php.net/manual/en/function.readfile.php
http://us.php.net/manual/en/function.header.php
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.