Hi, I am wondering if someone might be able to help me with my problem. I have been looking around forever, trying to figure out how to do this, so anyone who could help, I would be extremely grateful. Thanks in advance, Mike
Here is my problem:
I have three html pages, and I want all three to be put in a random order on my homepage. They are all advertising with me, so I would like to put them randomly, so they all get their share at the top, second and last. Here are my three html pages
http://tilecalgary.com/TileCalgary-HD.html
http://tilecalgary.com/TileCalgary-IS.html
http://tilecalgary.com/TileCalgary-DJP.html
I would like them to come out randomly in this type of a way:
http://tilecalgary.com/testpage.html
I have made progress, but my code still isn't working... here is what I have:
<?
$urls = Array("HD","IS","DJP");
$urlCount = UBound($urls) + 1;
Randomize;
for ($u=0; $u<=$urlCount-1; $u++) {
$r = floor( $urlCount * RND() );
$temp = $urls[$u];
$urls[$u] = $urls[$r];
$urls[$r] = $temp;
}
Set $FSO = Server.CreateObject("Scripting.FileSystemObject");
for ($u=0; $u<=$urlCount-1; $u++) {
Set $infile = $FSO.OpenTextFile( Server.MapPath("TileCalgary-".$urls[$u].".html") );
echo $infile.$readAll[ ];
$infile.Close;
?>
Am I close, or is this not even close? I really don't know the language, so I have been picking this up in pieces from here and there, and maybe it's just some stupid mistake, and that is why it isn't working. Basically, I would love it if someone much smarter than me could take a look at it, and let me know if it will work or not for what I want. Thanks so much for your time, and I hope someone can help me. Mike