Getting an image name


I am using PHP to call an image from a directory. The image source is a url, something like

showimage.php?pid=15&phototype=image/jpeg&photorealname=test&test[1] (4).jpg

However, when this image is called it cannot read the & and Im not even sure yet if it can read the [] or (). I tried using addcslashes and replacing certain things with its html code but it still did not work.

Any ideas?

The showimage.php page just has a header with the image file type and then I use readfile