![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
(felis madjewicus)
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
|
Rotating pages for display on the same url?
Say I have my traffic going to http://www.domain.com for which I have 4 entirely different HTML pages. I want these pages to rotate through 1 by 1 throughout the day. So each consecutive page view is displayed the next HTML file in the list, cycling through different pages for the viewers throughout the day. Evenly distributing the pageviews amongst the designs.
How would one go about achieving something like this? Is there an easy php fix for redirection that handles this function? Is it something doable with .htaccess? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
The Thrilla in Manila
Join Date: Sep 2004
Location: Thurbs' Lagoon, Christmas Island
Posts: 4,785
|
<SCRIPT LANGUAGE="JavaScript">
var howMany = 4; var page = new Array(howMany+1); page[0]="URL"; page[1]="URL"; page[2]="URL"; page[3]="URL"; page[4]="URL"; function rndnumber(){ var randscript = -1; while (randscript < 0 || randscript > howMany || isNaN(randscript)){ randscript = parseInt(Math.random()*(howMany+1)); } return randscript; } quo = rndnumber(); quox = page[quo]; window.location=(quox); </SCRIPT> make a .html or .php that is this and put the urls to load in that. if you want the location to be seemless, use a superframe ( 0,0,* ) type |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Sep 2007
Location: Cheshire, UK
Posts: 454
|
PHP Version:
Code:
<?php header("Location: /".rand(1,4).".html"); exit(); ?> 1.html 2.html etc You just need that code in index.php and it will redirect.
__________________
David • 421-179-116 • support [@] adultnetworkuk [.] com
Website Development • Website Hosting • Model Index Software • Website Reviews and Links Hit me up for more information on everything I do. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
(felis madjewicus)
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Location: RI
Posts: 2,112
|
__________________
![]() SUBMIT PORN BLOGS HERE ![]() ![]() ![]() ![]() ![]() ![]() ![]() Now Hiring My network is in need of clean, honest, good traders for different niches. Contact |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
So Fucking Banned
Join Date: Sep 2009
Location: On your last nerve
Posts: 1,012
|
Quote:
You could also do it with a Server Side Include. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |