1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Auto Redirection

Discussion in 'PHP & Perl' started by ericsson, Jan 11, 2010.

  1. ericsson

    ericsson Elite Member Premium Member

    Joined:
    Apr 25, 2009
    Messages:
    2,642
    Likes Received:
    8,132
    Occupation:
    www
    Location:
    Swe
    Home Page:
    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.
     
  2. zerofill

    zerofill Newbie

    Joined:
    Mar 22, 2009
    Messages:
    3
    Likes Received:
    0
    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.
     
  3. showboytridin

    showboytridin Regular Member

    Joined:
    Sep 5, 2009
    Messages:
    348
    Likes Received:
    714
    Location:
    127.0.0.1
    Popups only with javascript. You can control the unique visitors with PHP, so you can combine the two.
     
  4. angrish10

    angrish10 Junior Member

    Joined:
    Aug 24, 2009
    Messages:
    181
    Likes Received:
    184
    Location:
    La Isla Bonita
    I think cloaker will work...i do that with Cb products
     
  5. ericsson

    ericsson Elite Member Premium Member

    Joined:
    Apr 25, 2009
    Messages:
    2,642
    Likes Received:
    8,132
    Occupation:
    www
    Location:
    Swe
    Home Page:
    But noone knows how to do it?

    I want that each unique visitor will have an popup to the other site as well, when entering my site. :)

    CanĀ“t be so hard to make?

    //J
     
  6. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    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
     
  7. mchype14

    mchype14 Newbie

    Joined:
    Nov 30, 2009
    Messages:
    4
    Likes Received:
    0
    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.