Text Rotating Script?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pete
    Confirmed User
    • Jan 2001
    • 6617

    #1

    Text Rotating Script?

    I'm looking for a text rotating script that automatically pulls text files from a data base to update a members area site.

    Anyone have one?
    Evoke Electronics
  • andi_germany
    Confirmed User
    • Oct 2002
    • 768

    #2
    I did a script that pulls texts depending on the date.

    The names are in format 1.txt, 2.txt etc and I pull them by the date.

    Here is a script in perl:

    #!/usr/bin/perl

    $path_to_html="path/to/htmlfile";
    $path_to_data="path/to/datadir";

    $time = time;
    ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isd st) = localtime($time);
    $today = $wday.".txt";

    open (HTML,">$path_to_html/index.html");
    open (HEAD, "path_to_data/$today");
    @head = HEAD; (need bigger smaller as brackets around HEAD. won't show here)
    close (HEAD);
    foreach $line (@head) {
    print HTML"$line";
    }
    close (HTML);

    end srcipt.

    very simple way to do it .
    Last edited by andi_germany; 12-23-2002, 11:57 PM.
    SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.

    Comment

    • Carrie
      Confirmed User
      • Apr 2002
      • 3162

      #3
      Go to Hotscripts.com and look for something like "quote of the day" scripts.

      Comment

      • krox
        Confirmed User
        • Jan 2002
        • 253

        #4
        CsRandom does exactly that.

        Costs $20.

        Comment

        Working...