# Pic of the Day script?

**URL:** <https://forum.kirupa.com/t/pic-of-the-day-script/24950>\
**Category:** programming\
**Created:** [July 7, 2003, 3:49pm UTC](https://forum.kirupa.com/t/pic-of-the-day-script/24950 "2003-07-07T15:49:53Z")\
**Posts on this page:** 8\
**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 7, 2003, 3:49pm UTC](https://forum.kirupa.com/t/pic-of-the-day-script/24950/1 "2003-07-07T15:49:53Z")

</div>

anyone know a script?

with links and stuff of each pic…

the pics need to be in random order…

please help me…

thanks in advance.

---

<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 7, 2003, 3:55pm UTC](https://forum.kirupa.com/t/pic-of-the-day-script/24950/2 "2003-07-07T15:55:38Z")

</div>

what langauge?

---

<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 7, 2003, 4:19pm UTC](https://forum.kirupa.com/t/pic-of-the-day-script/24950/3 "2003-07-07T16:19:49Z")

</div>

o lol!

PHP of course  
😛

---

<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 7, 2003, 4:27pm UTC](https://forum.kirupa.com/t/pic-of-the-day-script/24950/4 "2003-07-07T16:27:06Z")

</div>

lol well i’m not much of a php expert but i guess it would be the same concept in ASP.

what i would do is, create a field in your db for your images. create another one for their links, and one more for their description. simply load them randomly, or by ID, or whatever. sorry i really don’t know the php code so I can’t help you, but there is a start

---

<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 7, 2003, 4:58pm UTC](https://forum.kirupa.com/t/pic-of-the-day-script/24950/5 "2003-07-07T16:58:10Z")

</div>

o man i dont where to start here…

i dont need it to be stored in a DB…

and client told me that he needs the script to do this…

When u enter the page.

a thumbnail of humm… 400x400 pic is displayed and when u click on that image it goes to another page with the same picture but at fullsize…

annnd the random 400x400 pic needs to change every 24hr not everytime you join the page…

i got this for the random thumbnail…

```php

<?php
//the urls to the pics
$urls = array(
"http://www.truetere.com" ,
"http://www.moramia.com" ,

 ); 
//the text to be displayed
$titles = array(
"pic of the day" ,
"pic of the day" ,
 );

//generate a random number 
//change the number in the $random to be equal to the
//number of links to display
srand(time());
$random = (rand()%2);

//display link
echo ("<a href = \"$urls[$random]\">$titles[$random]</a>"); 
?>

```

but how do i make everything else???

i still need… when the user clicks there it goes to another page with the same picture but fullsized…  
and the random pic needs to change every 24hr…

please help  
:hangover:

---

<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 7, 2003, 4:59pm UTC](https://forum.kirupa.com/t/pic-of-the-day-script/24950/6 "2003-07-07T16:59:38Z")

</div>

i really don’t know how to do it with php sorry

---

<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 7, 2003, 5:08pm UTC](https://forum.kirupa.com/t/pic-of-the-day-script/24950/7 "2003-07-07T17:08:45Z")

</div>

:hangover: no problem…  
anyone else tha can helpme?

---

<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 8, 2003, 1:56am UTC](https://forum.kirupa.com/t/pic-of-the-day-script/24950/8 "2003-07-08T01:56:28Z")

</div>

This is fairly simple to do with javascript, and there’s no need to re-invent the wheel. Got to Google and do a search for random image javascript and you’ll find dozens of cut & paste scripts to choose from.
