php gurus ... plz help $$

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PantieZ
    Confirmed User
    • Jan 2001
    • 1441

    #1

    php gurus ... plz help $$

    i build my galleries with this include :

    <?php include("../temp.php"); ?>

    how to code it that temp.php is random. i mean how to code it to let the include be a random .. like temp1.php , temp2.php ... etc ...

    i am shure for a guru this is a joke ... if you help me i will send you a few epass bucks.


    ICQ 132818937
  • Boobs
    Confirmed User
    • Aug 2006
    • 7875

    #2
    bump for u

    Join the fucking best in big tit sponsors!!!

    Comment

    • munki
      Do Fun Shit.
      • Dec 2004
      • 13393

      #3
      http://us3.php.net/manual/en/function.rand.php

      I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

      Comment

      • darksoul
        Confirmed User
        • Apr 2002
        • 4997

        #4
        Code:
        $x = rand(1,20);
        include("../temp$x.php");
        1337 5y54|)m1n: 157717888
        BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
        Cambooth

        Comment

        • polle54
          Confirmed User
          • Jul 2004
          • 4626

          #5
          Originally posted by darksoul
          Code:
          $x = rand(1,20);
          include("../temp$x.php");

          thats a fine solution for your problem.
          ICQ# 143561781

          Comment

          • A-Bomb
            Confirmed User
            • Dec 2004
            • 680

            #6
            Originally posted by darksoul
            Code:
            $x = rand(1,20);
            include("../temp$x.php");
            yup. That's the ticket.

            Comment

            • PantieZ
              Confirmed User
              • Jan 2001
              • 1441

              #7
              thx a lot

              Comment

              • GrouchyAdmin
                Now choke yourself!
                • Apr 2006
                • 12085

                #8
                Efficient. I like that. I'd pad it just so filenames would match (banner001.php), etc, but that's just my pedantic design.

                Code:
                $x = printf(%02d, rand(1,20));
                Sorry for the semi-hijack:

                darksoul: Got a second for a question or two? I'm rather new to supporting AT3, and for some reason, in.cgi seems to semi-randomly zombie on a new install.

                This site is not doing anything horribly exotic, either - it's using stock SSI. It eventually clears up, but it bothers me that I can get a quick burst of traffic and have 20 zombies.

                This machine is also production, so I can't just drop gdb on it and try to figure what the @#$@! is going on.

                Comment

                • vantage
                  Confirmed User
                  • Jun 2005
                  • 214

                  #9
                  I this thats saver!
                  PHP Code:
                  
                  $files = array("../file1.inc","../file2.inc","../file3.inc");
                  include($files[rand(0,count($files))]); 
                  

                  Comment

                  Working...