Can these two scripts be combined?

goodlessons

Newbie
Joined
Jun 26, 2009
Messages
33
Reaction score
7
Hey fellow BHWer's!

I'm not very html or php savvy yet, but I do have a little knowledge of the basics.

My question is... Is it possible to combine the two scripts shown below so that the URL in the address bar stays the same but the affiliate link is cloaked?

Can someone savvy fix the code for us BHWer's?

HERE IS THE HTML CODE FOR KEEPING THE ADDRESS URL THE SAME...

<html>
<head>
<script>window.status = ' ';</script>
<meta http-equiv="Content-Language" content="en-us">
<title>Welcome!</title><meta name="keywords" content="KEYWORDS GO HERE"/>
<meta name="description" content="DECRIPTION GOES HERE"/>
</head>

<frameset border="0" frameborder="0" marginleft="0" margintop="0" marginright="0" marginbottom="0" rows="100%,*">
<frame
src="HTTP://WWW.YOUR-AFFILIATE-LINK-GOES-HERE.COM"
scrolling="auto" frameborder="no" border="0" noresize>
<frame topmargin="0" marginwidth="0" scrolling="no" marginheight="0" frameborder="no" border="0" noresize>
<noframes>
<body>

</body>
</noframes>
</frameset>

</html>


HERE IS TWO PHP SCRIPTS USED TO CLOAK YOUR AFFLINK WITH DOUBLE META REFRESH...

"GOTO PHP CODE"

<?php
echo "<meta http-equiv=\"refresh\" content=\"0;url=HTTP://WWW.YOUR-WEB-ADDRESS.COM/goto2.php\">";
?>


"GOTO2 PHP CODE"

<?php
$referer = $_SERVER['HTTP_REFERER'];
if($referer == "")
{
echo "<meta http-equiv=\"refresh\" content=\"0;url=HTTP://WWW.YOUR-AFFIATE-LINK-HERE.COM\">";
}
else
{
echo "<meta http-equiv=\"refresh\" content=\"0;url=HTTP://WWW.YOUR-WEB-ADDRESS-HERE.COM\">";
}
?>

If any of you could help with this or have suggestions by all means please speak up, and if this helped any of you please give rep and click THANKS! :D
 
By the way if any of you want to know how to use the "Double Meta Refresh", there is plenty of info online and on the forums. Tutorials Galore! :D
 
People are viewing this but no one is commenting or offering a solution.
 
Last edited:
Sorry - can't easily help.

Why not try it and see how far you get?
 
So what do u want the script to do?? Tell me that clearly.. Cause, the php script actually, checks whether the referrer is blank. If it is blank, then it sends the user to affiliate link, and if it is not, it sends to ur address.. But the html file displays the affiliate link.. So what do u want the combined script to do.. I am not an expert but i can help u with all the wisdom i have.. :) ..
 
So what do u want the script to do?? Tell me that clearly.. Cause, the php script actually, checks whether the referrer is blank. If it is blank, then it sends the user to affiliate link, and if it is not, it sends to ur address.. But the html file displays the affiliate link.. So what do u want the combined script to do.. I am not an expert but i can help u with all the wisdom i have.. :) ..

I want the script to cloak my afflink and show my url in the address bar.

If I use the php script it shows a different url than what the visitor clicked on.

If I use the url script then my afflink is exposed in the source code, but the url in the address bar is my url.

I want a script that does both.

I hope that helps. :)
 
So what does the php script do actually.. It changes the referrer to ur site and then, it sends to the affiliate link right.. Now whats the problem there mate??
 
just throwing this out there. but you could do something along the lines of upload the scripts seperatly, lets say
yoursite.com/script1.php
yoursite.com/script2.php

and when you want to use it you can have
yoursite.com/SCRIPT.php
do this number

{include file='script1.php'}
{include file='script2.php'}

just an idea
 
So what does the php script do actually.. It changes the referrer to ur site and then, it sends to the affiliate link right.. Now whats the problem there mate??

The problem is that when someone clicks on my url link it changes the url in the address bar to a different url than my visitor clicked on.

Example:
The visitor clicks on http://www.My Url.com.
but...
when they are redirected to the product page it shows...
http://www.My Promoted Product.com/affiliate numbers and letters

So...

In the address bar I want it to continue to say www. My Url.com
but still be cloaked.

The html script I originally posted will do this, but my afflink is still visible if you click View>Page Source.
 
just throwing this out there. but you could do something along the lines of upload the scripts seperatly, lets say
yoursite.com/script1.php
yoursite.com/script2.php

and when you want to use it you can have
yoursite.com/SCRIPT.php
do this number

{include file='script1.php'}
{include file='script2.php'}

just an idea

Thanks for the reply, but as I mentioned before my php/html script knowledge is limited.

Where would I cut and paste this in, or would you mind cutting and pasting it in and then reposting here?

Thanks again! :D
 
there is a thanks button for this buddy. i would appreciate it, pm sent
Thanks for the reply, but as I mentioned before my php/html script knowledge is limited.

Where would I cut and paste this in, or would you mind cutting and pasting it in and then reposting here?

Thanks again! :D
 
I just thought of an idea! :D

Is it possible to put something in the script to make it impossible to view the source code?
 
Nope that is not possible.. Well now all u can do is, rent a domain, and redirect it to ur sales page.. so u wont get ur aff link seen.. simple.. :) ..
 
Nope that is not possible.. Well now all u can do is, rent a domain, and redirect it to ur sales page.. so u wont get ur aff link seen.. simple.. :) ..


Yep. This is pretty much the best way to cloak your affiliate link.

Well the simplest that is.

Cheers.
 
Back
Top