# Getting an image name

**URL:** <https://forum.kirupa.com/t/getting-an-image-name/249008>\
**Category:** programming\
**Created:** [January 14, 2008, 5:08pm UTC](https://forum.kirupa.com/t/getting-an-image-name/249008 "2008-01-14T17:08:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamerp](https://avatars.discourse-cdn.com/v4/letter/d/fbc32d/32.png) [@dreamerp](https://forum.kirupa.com/u/dreamerp)\
**Post date:** [January 14, 2008, 5:08pm UTC](https://forum.kirupa.com/t/getting-an-image-name/249008/1 "2008-01-14T17:08:12Z")

</div>

Hello,

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
