SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    May 2005
    Location
    London
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    rotate.php has stopped working

    Hi all

    My hosting provider has upgraded to PHP5 and now a couple of rotating image DIVs on my home page (http://thehill.org.uk) no longer work.

    Can anyone point me to a solution?

    Thanks.

    Paul
    Soft and Sound

  2. #2
    SitePoint Guru
    Join Date
    Feb 2008
    Posts
    655
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it software you have created yourself or downloaded from somewhere? If it is from somewhere else, check if they have a PHP5 version.

    If not, post some code here so we can see.

  3. #3
    SitePoint Zealot
    Join Date
    May 2005
    Location
    London
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks - I don't remember exactly where it was downloaded from, except that I followed a link from one of Sitepoint's articles. I guess I could look through those for 'rotating content' first. If no joy, I'll post the code.
    Soft and Sound

  4. #4
    SitePoint Zealot
    Join Date
    May 2005
    Location
    London
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've stopped looking for an update to the original roatte.php, which incidentally was on A List Apart, because I discovered this astonishingly simple version:

    <?php
    $files = glob('{*.PNG,*.png,*.JPG,*.jpg,*.GIF,*.gif}', GLOB_BRACE);
    readfile($files[array_rand($files)]);
    ?>

    Put that in a folder with the image files you want to rotate, and replace a specific image link with something like: images/random/rotate.php.

    Simple! All hail Rob (http://robm.me.uk/).
    Soft and Sound


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
  •