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

lewi

Elite Member
Jr. VIP
Aug 5, 2008
2,396
891
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??
 
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)
 
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
 
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)
 
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>
 
thank you :) really appreciate you taking the time :)
 
no problem lewi, if you have problems applying the script just let me know (pm). maybe i can help you too then
 
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>

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
 
?? 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
 
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
 
Back
Top
AdBlock Detected

We get it, advertisements are annoying!

Sure, ad-blocking software does a great job at blocking ads, but it also blocks useful features and essential functions on BlackHatWorld and other forums. These functions are unrelated to ads, such as internal links and images. For the best site experience please disable your AdBlocker.

I've Disabled AdBlock