GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Code for daily picture? (https://gfy.com/showthread.php?t=54212)

Hypo 03-20-2002 10:05 PM

Code for daily picture?
 
I want to include a self rotating daily picture in my html page code (index.shtml). I will name the pictures according to the dates and upload them on my server, say 051202.gif for 5th December 2002 etc.

What code do I insert in my html to automatically fetch that day's picture? Some kind of javascript. I cant use php I supposed since the index page extension is not php but shtml?

Hot Tropical Babes 03-20-2002 10:13 PM

email me [email protected], and i'll help you out :)

JackFoley 03-20-2002 10:32 PM

You can create a seperate PHP page and include it on your SHTML page like this:

[!--#include file="random_img.php"--]

The PHP file would look like this:

[?php
$date = date("dmY");
echo("[img src='/dailypics/$date.jpg']");
?]

Remember to replace [ and ] with < and >.

Hope that helps. :)

Big E 03-21-2002 08:54 AM

The easiest way is to have a "default" picture (default.jpg) and use a crontab to copy a picture to that filename every night at midnight.


All times are GMT -7. The time now is 08:18 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123