PHP random numbers? Help needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Oracle Porn
    Affiliate
    • Oct 2002
    • 24433

    #1

    PHP random numbers? Help needed

    Anyone has a random numbers script that I set up a fake tube with?
    I'm looking for a script to output fake random numbers for views and for length, anyone can help?


  • k0nr4d
    Confirmed User
    • Aug 2006
    • 9231

    #2
    <? echo rand(0,1000); ?>

    http://lu2.php.net/rand
    Mechanical Bunny Media
    Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development

    Comment

    • k0nr4d
      Confirmed User
      • Aug 2006
      • 9231

      #3
      oh, and for length...

      <?
      function sec2time($s) {
      $d = intval($s/86400);
      $s -= $d*86400;
      $h = intval($s/3600);
      $s -= $h*3600;
      $m = intval($s/60);
      $s -= $m*60;
      if ($d) $str = $d . ':';
      if ($h) $str .= $h . ':';
      if ($m) { $str .= str_pad($m,2,'0',STR_PAD_LEFT) . ':'; } else { $str .= "00:"; }
      $str .= str_pad($s,2,'0',STR_PAD_LEFT);
      return $str;
      }
      echo sec2time(rand(0,1000));
      ?>
      Mechanical Bunny Media
      Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development

      Comment

      • Oracle Porn
        Affiliate
        • Oct 2002
        • 24433

        #4
        thanks, the first one helps more, i found something like this:


        Length: <?php print rand(10, 30). ":"; print rand(10, 60); ?>
        Views: <?php print rand(1, 99999); ?>


        Comment

        Working...