Hello folks, how are you over there?! I need to redirect users to new home pages every time they come. I will create those new pages in advance. It means that everything is going to stay the same ion home page, but text on the middle of a page has to be displayed different every second, third or day that they visit website. You probably know what I mean, it has to look "FRESH." Is there some good script that you know for sure and it works fine. All your replies will be greatly appreciated! Al
this meta tag code for forward url to other url: <meta http-equiv="refresh" content="0;url=your site"> PHP: content="0 : time for forwarding
<SCRIPT LANGUAGE="JavaScript"><!-- var now = new Date(); var hour = now.getHours() + 1; if (document.images) location.replace('http://www.somewhere.com/index' + hour + '.html'); else location.href = 'index' + hour + '.html'; //--></SCRIPT> Code (markup): That should work for you. Will load a new page every hour based on the cookie they have. You can modify this to work for other purposes i'm sure. Hope that helps. edit: Forgot that you will name the index files 1 through 24. For example index1.html through index24.html. Edit2: This might work better for you. <SCRIPT LANGUAGE="JavaScript"> var howMany = 2; // max number of items listed below var page = new Array(howMany+1); page[0]="first-random-page.html"; page[1]="second-random-page.html"; page[2]="third-random-page.html"; 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); // End --> </SCRIPT> Code (markup):
livingeek Thanks a lot geek, I'll try all of them! What do you think, will it make problems for indexation?