GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   php gurus ... plz help $$ (https://gfy.com/showthread.php?t=655059)

PantieZ 09-13-2006 09:45 AM

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 09-13-2006 09:47 AM

bump for u

munki 09-13-2006 09:48 AM

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

darksoul 09-13-2006 09:50 AM

Code:

$x = rand(1,20);
include("../temp$x.php");


polle54 09-13-2006 09:54 AM

Quote:

Originally Posted by darksoul
Code:

$x = rand(1,20);
include("../temp$x.php");



thats a fine solution for your problem.

A-Bomb 09-13-2006 09:54 AM

Quote:

Originally Posted by darksoul
Code:

$x = rand(1,20);
include("../temp$x.php");


yup. That's the ticket.

PantieZ 09-13-2006 09:59 AM

thx a lot :)

GrouchyAdmin 09-13-2006 10:01 AM

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.

vantage 09-13-2006 10:27 AM

I this thats saver!
PHP Code:


$files 
= array("../file1.inc","../file2.inc","../file3.inc");
include(
$files[rand(0,count($files))]); 



All times are GMT -7. The time now is 07:23 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123