below is a Full page Iframe to display the offer URL and prevent bots from following the link to the final destination URL
the problem is it directs to r-decode.php which is a code that masks the url somehow, and is striping my tracking.
why is it killing my tracking?
how could i just bypass r-decode.php and go to another file?
if one of u scholars can tell me how to do this be much appreciated.
Code:<?php
$offerURL = "http://www.hostgatorxcom/";//put your offer's affiliate jump link here
$offerURL = trim($offerURL);//do not edit this line
$thisRedirectUrl = base64_encode($offerURL);//do not edit this line
$thisRedirectUrl = "r-decode.php?{$thisRedirectUrl}";//do not edit this line
?>
Last edited by James.H; 03-07-2010 at 05:42 AM.
Everything depends on how r-decode is built up, and how $thisRedirectUrl is used in your code.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
Yea, can you show us that r-decode.php file ?
thx for replies
this is the bottom of the php code, so i guess this is what $thisRedirectUrl is used for
and here is the r-decode.phpCode:?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Edit Me</title>
<META name="description" content="">
<META name="keywords" content="">
</head>
<frameset rows="100%,*" border="0">
<frame src="<? echo $thisRedirectUrl; ?>" frameborder="0" />
<frame src="UntitledFrame-2" frameborder="0" noresize />
<noframes>
Put content here...
</noframes>
</frameset>
</html>
Code:<?php
// Note: there's no need to modify this file. Just upload it to your server along with the iframe file.
// this file redirects the user to your link while hiding the refer information from the destination URL
$thisReferringUrl = @$_SERVER["HTTP_REFERER"];//use default in case the requested url is invalid
$clientIPNumber = @$_SERVER["REMOTE_ADDR"];
$clitentBrowserUserAgent = @$_SERVER["HTTP_USER_AGENT"];
if (empty($clitentBrowserUserAgent)){
//no useragent means it's a bot
header("HTTP/1.0 301 Permanent Redirect");
header("Location: http://127.0.0.1",true,301);
exit;
}
$topMargin = rand(10,111);
$thisRedirectUrl = null;
$imagePropertiesArr = array();
if (!empty($imagesArr)){
$rand_key = array_rand($imagesArr, 1);
$imageProperties = $imagesArr[$rand_key];
$imagePropertiesArr = explode("|",$imageProperties);
}
$url_encoded = @$_SERVER["QUERY_STRING"];
if (!empty($url_encoded)){
$url_encoded = trim($url_encoded);
$url_decoded = base64_decode($url_encoded);
if (checkValidURL($url_decoded)){
$thisRedirectUrl = $url_decoded;
}
}
function checkValidURL($siteurl){
$siteurl = trim($siteurl);
$siteurlVal = $siteurl;
$siteurlVal = ereg_replace("[^a-zA-Z0-9?:=,;@#$|&+%\/._-]", "", $siteurlVal);//strip out invalid chars
if ($siteurl != $siteurlVal) return false;
if(ereg("^http://.+\\..+$", $siteurl) || ereg("^https://.+\\..+$", $siteurl))
return true;
else
return false;
}
if (empty($thisRedirectUrl)){
header("HTTP/1.1 404");
header("Location: 404");
exit;
}
//echo $thisRedirectUrl;
//exit;
//header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT");
//header("Pragma: no-cache");
//header("HTTP/1.0 301 Permanent Redirect");
?><html>
<head>
<meta name="robots" content="noindex,nofollow">
<meta http-equiv="refresh" content="0;url=<? echo $thisRedirectUrl; ?>" />
</head>
<body>
<script language="JavaScript" type="text/javascript">
function go(){
document.location.href="<? echo $thisRedirectUrl; ?>";
}
setTimeout ('go()', 1);
</script>
</body>
</html>
Last edited by Orjan; 03-07-2010 at 12:34 PM. Reason: Please use code tags!
can i take the out r-decode somehow?
is there a way to do this but not blank to referrer everything comes up blank in tracking?
well i got the tracking to work,
but this code is blanking the refferrer, which i do not want it to do.
does anybody know how to cure this?
thx
ThisCode:<?php
$offerURL = "http://www.hostgatorxcom/";//put your offer's affiliate jump link here
$offerURL = trim($offerURL);//do not edit this line
$thisRedirectUrl = base64_encode($offerURL);//do not edit this line
$thisRedirectUrl = "r-decode.php?{$thisRedirectUrl}";//do not edit this line
?>
Is gonna be something like this:Code:$thisRedirectUrl = "r-decode.php?{$thisRedirectUrl}";//do not edit this line
?r-decode.php?http://www.hostgatorxcom/
If you want it to work like this then http://www.hostgatorxcom must be defined in your code..
so..
I guess it's missing something like ?url=Code:if($_GET['http://www.hostgatorxcom']){
// do somethign
}
And your redirect address would be:
Then it should be like this in your file:r-decode.php?url=http://www.hostgatorxcom/
Or something like that..Code:if($_GET['url'] == "http://www.hostgatorxcom/"){
// do something
}
how can i keep the i frame but lose the r-decode, just shoot it to another domain?
or do i have to have that?
I guess you have to build a new file for it or.. just yea redirect them directly to another site..
yeah i would just want to hit the iframe page then redirect from that page to another url.
does this look like it would work?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks