# Php Image

**URL:** https://forum.kirupa.com/t/php-image/165790
**Category:** Uncategorized
**Created:** [October 13, 2005, 10:04pm UTC](https://forum.kirupa.com/t/php-image/165790 "2005-10-13T22:04:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Maniaci](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Maniaci](https://forum.kirupa.com/u/Maniaci)
#### Post date: [October 13, 2005, 10:04pm UTC](https://forum.kirupa.com/t/php-image/165790/1 "2005-10-13T22:04:38Z")

</div>

I’m not sure exactly how to go about this, but I want to have something like this:

```auto

<img src="img.php?img=path/to/my/image.jpeg">

```

Where img.php will will take the path and output it. It will do basically the same thing the html \<img\> tag will do, but this way I can get the image from an .htpasswd protected directory.

If anyone knows how to do this, or a better way to display an image within a protected directory, that would be great.

Thanks.
