# How do i call an image like this

**URL:** <https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716>\
**Category:** Uncategorized\
**Created:** [July 15, 2003, 11:57pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716 "2003-07-15T23:57:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![thediablo](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@thediablo](https://forum.kirupa.com/u/thediablo)\
**Post date:** [July 15, 2003, 11:57pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716/1 "2003-07-15T23:57:04Z")

</div>

```php
<img src="http://www.x.com/carpeta/imagen.php">

```

i try print(); and echo(); and nothing

please help…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2003, 5:15pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716/2 "2003-07-16T17:15:14Z")

</div>

whats the PHP code?

I do something similar with my footer… more details and I’ll be able to help 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2003, 5:20pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716/3 "2003-07-16T17:20:09Z")

</div>

This might help show you how to do it also…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2003, 6:04pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716/4 "2003-07-16T18:04:52Z")

</div>

what might help me? i see no code 😛

but here is al live example

```php
http://www.caseyscam.com/potd/thumb.php

```

if you put that in

```php
<img src="http://www.caseyscam.com/potd/thumb.php">

```

it displays the image

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2003, 7:25pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716/5 "2003-07-16T19:25:26Z")

</div>

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=26988](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=26988)

sorry forgot the link…

and I don’t want to see the live example, I want to see your php code so I can see if you are creating and destroying the image correctly…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2003, 7:36pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716/6 "2003-07-16T19:36:28Z")

</div>

i found some code and mix it with mine…  
but the server is marking som erros on the last 3 lines…

```php

<?php 
header("Cache-Control: no-store, no-cache, must-revalidate"); 
header("Pragma: no-cache"); 
header("Content-type: image/jpeg"); 
$image_path = "/public_html/domain.com/potd/th/";
 $images = array("tnimgrxq.jpg",
 "tnimgade.jpg",
 "tnimgres.jpg",
 "tnimgwer.jpg",
 "tnimgpon.jpg",
 "tnimgsir.jpg",
 "tnimgren.jpg",
 "tnimgtoe.jpg",
 "tnimgtri.jpg",
 "tnimgtra.jpg",
 "tnimglin.jpg",
 "tnimgler.jpg",
 "tnimglom.jpg",
 "tnimglot.jpg",
 "tnimgwot.jpg",
 "tnimgtce.jpg",
 "tnimgreq.jpg",
 "tnimgron.jpg",
 "tnimgrse.jpg",
 "tnimgrio.jpg",
 "tnimgrmi.jpg",
 "tnimgrlo.jpg",
 "tnimguon.jpg",
 "tnimguli.jpg",
 "tnimgoni.jpg",
 "tnimgore.jpg",
 "tnimgoae.jpg",
 "tnimgkie.jpg",
 "tnimgkol.jpg",
 "tnimgkae.jpg",
 "tnimgzin.jpg");
$handle = fopen('$image_path$images[$day_of_month]', "r"); 
fpassthru($handle); 
fclose($handle); 
?> 

```

i think is something to do with the $handle and the 2 vars i got there…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2003, 7:38pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716/7 "2003-07-16T19:38:29Z")

</div>

after i put the ‘’ 's in the fopen tag this errors came up.

\<br /\>  
\<b\>Warning\</b\>: fopen("$image\_path$images[$day\_of\_month]", “r”) - No such file or directory in \<b\>/public\_html/domain.com/potd/tnpotd.php\</b\> on line \<b\>43\</b\>\<br /\>  
\<br /\>  
\<b\>Warning\</b\>: fpassthru(): supplied argument is not a valid File-Handle resource in \<b\>/public\_html/domain.com/potd/tnpotd.php\</b\> on line \<b\>44\</b\>\<br /\>  
\<br /\>  
\<b\>Warning\</b\>: fclose(): supplied argument is not a valid File-Handle resource in \<b\>/public\_html/domain.com/potd/tnpotd.php\</b\> on line \<b\>45\</b\>\<br /\>

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2003, 7:43pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716/8 "2003-07-16T19:43:22Z")

</div>

and if i put the absolute path besides the VARS in fopen it works perfectly…

maybe it has to do with the fopen( **$vars** ,“r”);

maybe im putting the vars wrong or something…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 16, 2003, 7:52pm UTC](https://forum.kirupa.com/t/how-do-i-call-an-image-like-this/25716/9 "2003-07-16T19:52:40Z")

</div>

LOL!!!

NEVERMIND!!!1

i figure it out…

i accidentally delete the day\_of\_the\_month VAR!

hahaha

how st0pid

thanks!!!1
