/    Sign up×
Community /Pin to ProfileBookmark

Screenshot of the Day

Hello guys.. I’ve been trying to search for a javascript to display a “Screenshot of the Day” .. Though no luck..

I’d like it to cycle through the “Images” from a folder on my host site..

The host site folder would be “http://www.gravediggers.110mb.com/images/

I’d like it if you would be able to upload images to the folder, and not having to upload a list or anything.. Because I tried with a Javascript Slideshow, which I configured to change 1 time each 24th hour.. Problem was I had to update the script everytime I uploaded a new image, and the script gets kinda big that way.

Any chance you can do this ? Or is it not possible ?

Oh and perhaps limit the Image to a Thumbnail size like ?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@CharlesDec 26.2006 — Here's a piece of script that I've been using to rotate some images:[code=php]<?php

$pix = glob('front-photos/*.JPG');
$src = $pix[(time() / (60 * 60 * 24 * 28)) % count ($pix)];
$size = getimagesize ($src);
echo "<img alt="" src="$src" style="float:right; margin:1em; padding:0" $size[3]>";

?>[/code]
You'll want to adjust the numbers to make it rotate more frequently. And you'll need to see http://www.php.net/manual/en/features.file-upload.php and http://www.php.net/manual/en/function.imagecopyresampled.php to fill out the project.
×

Success!

Help @Koudelka spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...