anyway to avoid =

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
greenhorn
Forum Newbie
Posts: 2
Joined: Sun Jan 19, 2003 2:44 am

anyway to avoid =

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post 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]
greenhorn
Forum Newbie
Posts: 2
Joined: Sun Jan 19, 2003 2:44 am

Post by greenhorn »

thanks

that was exactly that what i was looking for

:P
Post Reply