Jump to content

random files load.


egturnkey

Recommended Posts

Hope you aren't from an English speaking country ;)

Anywho I would just store the values of the file names in an array and shuffle the array.

Well, yes that is right, i'm not english man

i'm from egypt

 

 

anyway i mean, how can i add

 

<? include_once("x.php"); ?>

but make it in random way so it meight be x.php and next time be y.php and next z.php ..ect ( random )

 

hope you got what i've ment

Link to comment
https://forums.phpfreaks.com/topic/195313-random-files-load/#findComment-1026349
Share on other sites

Hope you aren't from an English speaking country ;)

Anywho I would just store the values of the file names in an array and shuffle the array.

Well, yes that is right, i'm not english man

i'm from egypt

 

 

anyway i mean, how can i add

 

<? include_once("x.php"); ?>

but make it in random way so it meight be x.php and next time be y.php and next z.php ..ect ( random )

 

hope you got what i've ment

 

Put all of your file names in an array

$arr = array('x.php', 'y.php', 'z.php');

 

Shuffle your array

shuffle($arr);

 

Load the first value in your array

include_once($arr[0]);

Link to comment
https://forums.phpfreaks.com/topic/195313-random-files-load/#findComment-1026353
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.