hey,
I'm looking for a solution to serve up random pages (100) and not sure what I need, any help would be appreciated.
Thanks,
Sheriece
hey,
I'm looking for a solution to serve up random pages (100) and not sure what I need, any help would be appreciated.
Thanks,
Sheriece
Do you want this server-side or client-side? Can you use PHP?
Something like:
Could do the trick.Code:<?php $pages = array("http://google.com", "http://yahoo.com", "http://dynamicdrive.com"); header("Location: ".$pages[rand(0, count($pages)-1)]);
Jeremy | jfein.net
Hello Nile,
Thank you for your response, the truth is I don't know what I don't know. This is how I imagine this to work. Once a person hits an initial html page and clicks a link, they are served up one of 100 pages. I also need the ability to make one of the pages (the winner) show every 1 in 1000 times. I assume these can be html pages. Once I have a script, where do I put it? I'd like to build this from a wordpress platform.
Thanks in advance!
Sheriece
That definitely sounds like server side. Pick the random page in your server side and insert into the href.
If you are picking a "winner" you need to avoid javascript completely for this. Anyone can check the source and then make the winning page pop up very easily.
Also, if this is some sort of "instant win" I would highly advise against doing this if you don't know what you're doing.
Thanks, clearly I don't know what I'm doing. The winning page is served up on a mobile device to be taken into a business establishment to claim prize. It doesn't need to be on a wordpress platform. So I can take the code
<?php
$pages = array("http://google.com", "http://yahoo.com", "http://dynamicdrive.com");
header("Location: ".$pages[rand(0, count($pages)-1)]);
replace with my url's, copy into href on every url I create and the pages will dynamically rotate? Or do I put the code on the initial page only that they land on and click a link to see if they wonand are redirected to rotating page?
How can I add the 1 in 1000 option to the code?
Thanks for taking the time!
Sheriece
The problem is, the first person to win can then spread the url of the winning page around and you'll have no way of knowing the real winner from the copies.
Again, you do not want to get involved with any sort of instant win thing if you aren't an expert.
hey Sheriece, did you ever get anywhere with this?
Bookmarks