Auto Redirection

ericsson

Elite Member
Joined
Apr 25, 2009
Messages
2,640
Reaction score
8,233
Hi!

I want to see if any of you guys know a simply php code i can add to my site.

I want to redirect every unique visitor to my other site when enter the first one.
So when they enter first site, they will also popup site number 2 for them.

PHP entry code please.

//J

Rep given if you have any suggestions.
 
Your gonna have to do that with javascript I am guessing.
Probably have a link to the other site with a certain id and an onclick event and the javascript to initiate the click of the link with that id...

Not a javascript guy though...

But that is my guess.
 
Popups only with javascript. You can control the unique visitors with PHP, so you can combine the two.
 
ericsson - You can do this using PHP/MySQL and JS or using only JS.
here u have example JS code:
Code:
var cookietime=24;

function createCookie(name,value,hours){
if(hours){var date = new Date();date.setTime(date.getTime()+(hours*60*60*1000));
var expires = "; expires="+date.toGMTString();}else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";}

function readCookie(name){var nameEQ = name + "=";var ca = document.cookie.split(';');for(var i=0;i < ca.length;i++) {var c = ca[i];while (c.charAt(0)==' ') c = c.substring(1,c.length);if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);}return null;}

var visit=readCookie('visit');
if(visit){}
else
{
createCookie('visit','ok',cookietime);

//
//	HERE ADD YOUR POPUP CODE
//
}
It will show popup every unique vistor (once per 24h).
All u have to do is add popup code. You can use something like blackhatcode breaker/simple popup/somethings like lightbox - there is a lot of ways to make it good.

regards
Lukas
 
you know, you reminded me of something that i had found a while back. it was a method you were supposed to couple with something called trek advertising. lol idk if its even good.

well good luck with ur ventures.
 
Back
Top