Home | Scripts | Tutorials | Books | Hosting | Forums | Links|

Navigation:

Home
Source code
Tutorials
RSS feeds
Articles
Books
Software
Downloads
Hosting
manuals
Forums
Script directory
Training
Our Links

ADD TO Progged Progged
ADD TO DEL.ICIO.US Del.icio.
ADD TO DIGG Digg
ADD TO FURL Furl
ADD TO NEWSVINE Newsvine
ADD TO NETSCAPE Netscape
ADD TO REDDIT Reddit
ADD TO STUMBLEUPON StumbleUpon
ADD TO TECHNORATI FAVORITES Technorati
ADD TO SQUIDOO Squidoo
ADD TO WINDOWS LIVE Windows Live
ADD TO YAHOO MYWEB Yahoo MyWeb
ADD TO ASK Ask
ADD TO GOOGLE Google
ADD TO MAGNOLIA Magnolia
ADD TO SPURL Spurl



 
 

SPONSORS



 
 

Random link depending on week

This will display a link depending on which week of the month it is . You could put more than one link in , perhaps using arrays for the link and description . This will be our last script which demonstrates displaying content depending on which week of the month it is but you could have quotes , images , banners , news etc.

The script.

<?php
$week = date("j");
//week one link(s)
if ($week <= 7)
{
$url = "http://vbscript.myscripting.com";
$desc = "VBScript site";
}
//week two link(s)
else if ($week >=8 && $week <= 14)
{
$url = "http://asp.myscripting.com";
$desc = "Beginners ASP";
}
//week three link(s)
else if ($week >=15 && $week <=21)
{
$url = "http://www.beginnersphp.co.uk";
$desc = "Beginners PHP";
}
//week four link(s)
else
{
$url = "http://javascript.myscripting.com";
$desc = "JavaScript resources";
}
echo "<a href = \"$url\">$desc</a>";
?>

and here is this weeks link.

Beginners PHP