Results 1 to 3 of 3

Thread: Need a script for my Joomla site to display a different HTML file each hour.

  1. #1
    Join Date
    Sep 2010
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Need a script for my Joomla site to display a different HTML file each hour.

    Need a script for my Joomla site to display a different HTML file each hour.

    I have many different HTML files sitting in my public_HTML webserver directory in the format of 092306.html, this file is 6am hour (24h time) 23rd of September. There's 24 different html files each day in this same format. I need some way of when the page is displayed in Joomla, it will display the correct HTML file for the actual time of the day.

    I have been given this so far:
    <?php include(date('dmH').'.html'); ?>

    How would I insert this into one of the pages in Joomla so it will display the correct HTML file.

  2. #2
    Join Date
    Sep 2010
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    That's okay, I worked it out, save the line of PHP as a PHP file, install Jumi into Joomla, upload the PHP file, then add the following line only into one of the Articles.

    {jumi [WirelessPlaylist.php]}

    Only problem is that the server where my website is hosted is not in my country, so it picks up wrong time for me and displays the wrong HTML file.

    How can I modify this script <?php include(date('mdH').'.html'); ?> so that the H (hour) part can be modified to add 10 hours to it.

  3. #3
    Join Date
    Sep 2010
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I managed to work it out...

    <?php date_default_timezone_set('Australia/Sydney');

    include(date('mdH').'.html'); ?>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •