Page 1 of 1

anyway to avoid =

Posted: Sun Jan 19, 2003 2:44 am
by greenhorn
HI

This is what i got.

http://domain.com/img.php?img=example.jpg

Its a script that gets an image from a predefined directory. i just noticed thats some bulletinboards disabled the feature to link images that contain = (equal sign) in their url. I want to know if there is anything i can do to avoid using the equal sign e.g. some other way to link to the image without revealing the true directory on the server.

Thanks for reading

Posted: Sun Jan 19, 2003 3:46 am
by volka
try calling http://domain.com/img.php/example.jpg and $_SERVER['PATH_INFO'] will contain /example.jpg
see also: http://www.php.net/manual/en/reserved.variables.php

Posted: Mon Jan 20, 2003 1:13 am
by mydimension
or another alternative that i personally like is use a url like so:
http://domain.com/img.php?example.jpg

and then everything after the '?' is stored in $_SERVER['argv'][0]

Posted: Tue Jan 21, 2003 4:32 am
by greenhorn
thanks

that was exactly that what i was looking for

:P