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

Link cloacking help (isnt working like its ment to be)

Discussion in 'Cloaking and Content Generators' started by lewi, Dec 4, 2008.

  1. lewi

    lewi Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 5, 2008
    Messages:
    2,309
    Likes Received:
    818
    Hey peoples
    Okay ive tried normal redirect to my domain i purchased to an affiliate link

    ive tried the php redirect but still its not right

    it works... BUT when it shows the page the url bar shows something like this
    http://www.domainforaffiliate.com/index.php?hop=myidhere

    How do i stop it from still showing my id as if they delete that and then reload the page then i loose my commission :( any ideas??
     
  2. macmastermike

    macmastermike Junior Member

    Joined:
    Apr 2, 2008
    Messages:
    116
    Likes Received:
    33
    Location:
    Grand Duchy of Bavaria
    start a session, create a session variable (eg $_SESSION['hop']) and put your $_GET['hop'] value in there. after the value is stored in the session-variable, make a redirect to just your index.php with header("Location: index.php").

    then you should have your affiliate-id inside the $_SESSION['hop'] variable - ready to get used eg. on outgoing links.

    i don't know if it works (but it should as i'm doing something very similar for tracking and getting some statistics for my links)
     
  3. lewi

    lewi Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 5, 2008
    Messages:
    2,309
    Likes Received:
    818
    im totally confused im afraid.... lolz im a noob with all of this normally i just use the link given but need to be carefull with adwords now and dont want to loose conversions because of dicks deleting my hop id
     
  4. macmastermike

    macmastermike Junior Member

    Joined:
    Apr 2, 2008
    Messages:
    116
    Likes Received:
    33
    Location:
    Grand Duchy of Bavaria
    no problem lewi. i'll write that little script for you later (have to finish some work now, and then i'll post a solution)
     
    • Thanks Thanks x 1
  5. lewi

    lewi Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 5, 2008
    Messages:
    2,309
    Likes Received:
    818
  6. macmastermike

    macmastermike Junior Member

    Joined:
    Apr 2, 2008
    Messages:
    116
    Likes Received:
    33
    Location:
    Grand Duchy of Bavaria
    ok lewi here we go. i tested the script and it seems to work. the problem with sessions is: when the browser gets closed the hip-value also disappears... a cookie is the better solution then.

    Code:
    <?php
    	session_start();
    	if (isset($_GET['hop'])) {
    		$_SESSION['hop'] = $_GET['hop'];
    		header("Location: index.php");
    	}
    ?>
    
    <body>
    <a href="yoursite.com/?affi=<?php echo $_SESSION['hop']; ?>">yoursite.com/?affi=<?php echo $_SESSION['hop']; ?></a>
    </body>
    
     
    • Thanks Thanks x 1
  7. lewi

    lewi Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 5, 2008
    Messages:
    2,309
    Likes Received:
    818
    thank you :) really appreciate you taking the time :)
     
  8. macmastermike

    macmastermike Junior Member

    Joined:
    Apr 2, 2008
    Messages:
    116
    Likes Received:
    33
    Location:
    Grand Duchy of Bavaria
    no problem lewi, if you have problems applying the script just let me know (pm). maybe i can help you too then
     
  9. drkenneth

    drkenneth Executive VIP

    Joined:
    Nov 13, 2008
    Messages:
    285
    Likes Received:
    176
    Occupation:
    Developer/Entrepreneur
    Location:
    USA
    I do not think that code will have the desired effect... You seem to be just reading the hop ID from the GET string, storing it in a session variable, then writing it right to the link? That doesn't change anything when they get to the affiliate. Sessions variables are ONLY maintained on YOUR server. When they go somewhere else they are of no value, as their server has no idea what your server stores for session variables.

    Basically, you're going to have to live with the link containing that part of the string. They can delete it if they want to--you have no control over that. In most cases however, they wont. So don't stress out about it.

    It IS possible that the affiliates page reads the generic headers, i.e. looks at the POST data if there is no GET data. In that case you could add post data through a form--but if the don't work that way you'll get NO commission instead. (Plus it would require using a form-type-link, which is messy and inefficient.) Really, I think you should leave it as it--it's out of your hands. Don't worry about what 2% of people will do and worry about what will get you 100% more people :D
     
  10. macmastermike

    macmastermike Junior Member

    Joined:
    Apr 2, 2008
    Messages:
    116
    Likes Received:
    33
    Location:
    Grand Duchy of Bavaria
    ?? the script woll work on the landing page, the user won't see the aff-id in the url then...

    as soon as you go to the merchants website, the aff-id will be put into the url - and so the cookie is set at the merchants website (you can manually edit the link then the cookie won't disappear until the cookie lifetime is over or it's replaced by another affiliates cookie...)

    so yes, the session var stays on your server - but will be sent to the merchant with the click then...

    but the leaving as it is idea is good as veeeery few surfers will remove the aff-id. normally when you're at the merchants site and the site has seen the aff-id the cookie is set... so it has no more affect when the surfer removes the aff-id after the page was loaded
     
  11. yowies

    yowies Regular Member

    Joined:
    Apr 8, 2008
    Messages:
    473
    Likes Received:
    145
    Occupation:
    No
    Location:
    YowieLand
    Or...for a few bucks..use namestick.com
    They make pretty easy..you just buy a domain name through them that is bland.
    Then its
    "affiliateproductwhateverulikehere.blandname.com"
    and on and on