Daily Changing Content Or Link Throughout Month

by Hiroshi on June 17, 2008

in Randomizing, Rotating Content

Here is the script by that you can place links or data in it and each day different link or data or quote will be displayed. This script is for whole month. Content will just rotate throughout the month.

Usage

<?php
// Put Your Sites or quote or data, 1 for each day
$day1='www.yoursite.com';
$day2='data2';
$day3='data3';
$day4='data4';
$day5='data5';
$day6='data6';
$day7='data7';
$day8='data8';
$day9='data9';
$day10='data10';
$day11='data11';
$day12='data12';
$day13='data13';
$day14='data14';
$day15='data15';
$day16='data16';
$day17='data17';
$day18='data18';
$day19='data19';
$day20='data20';
$day21='data21';
$day22='data22';
$day23='data23';
$day24='data24';
$day25='data25';
$day26='data26';
$day27='data27';
$day28='data28';
$day29='data29';
$day30='data30';
$day31='data31';
//Make the array
$urls=array($day1, $day2, $day3, $day4, $day5, $day6, $day6,
$day7, $day8, $day9, $day10, $day11, $day12, $day13,
$day14, $day15, $day16, $day17, $day18, $day19, $day20,
$day21, $day22, $day23, $day24, $day25, $day26, $day27,
$day28, $day29, $day30, $day31);
//Get day of the month
$day=date("j");
//Print in broswer
 
// Output options
 
// In case of websites
print("Today's Site or Data is <a HREF=https://".$urls[$day]."> ".$urls[$day]."</a>");
 
// In case of data or quotes
// print("Today's data is ".$urls[$day]);
 
?>

Use appropriate print line above for links or data according to your needs.

Link Changes Every Day

Related Posts

Previous post:

Next post: