Jump to content

Mike521266

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Mike521266's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So, by suggesting something else, are you saying I'm pretty far off with my code that I have now? I am just hoping that I can make something work like what I have because it is more convenient for me, and I will be dealing with this type of stuff a lot, so it will save me quite a bit of time in the long run if I don't have to open another program and upload it to my server every time... anyway, I don't need to explain why that would save me time, but it just would, so I would like to do it the way I have it if I can... do you think it will work that way if I make a couple changes, or should I just do the text file thing like you said? Thanks, Mike
  2. Okay, well, I have another option that I have been working on, do you think this is somewhere close? Does it just need another couple of tweaks to get it to work? Or is this a bust as well? My problem with this one is that it doesn't actually shuffle, it just keeps printing them all out on top of each other, and they always print in the same order, so I continue to see the same one banner every time I refresh the page. <?php $ad_array = array(include("TileCalgary-DJP.php"), include("TileCalgary-HD.php"), include("TileCalgary-IS.php")); shuffle($ad_array); print_r($ad_array); ?> Here is the page that it loads to: http://tilecalgary.com/testpage2.php Thanks very much for taking the time to help me. I really appreciate it. Mike
  3. 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
×
×
  • 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.