I need to start off by saying that this is kind of complicated and I don't really know very well what I'm doing.
First off, I need to be able to take a tell-a-friend form and have it send the URL of whatever site is showing (easy part). However, I need this script or whatever to be able to include the VISIBLE URL that is showing and change it (if possible) into something entirely different.
This is really important because I need to be able to send URLs with affiliate IDs encoded.
An example of a URL that would need to be taken would be this:
Code: Select all
http://www.myfreeadssecret.com/?hop=verilon
Code: Select all
http://hop.clickbank.net/?verilon/myfas
So would there be any kind of script that would be able to copy that first URL and extract the affiliate ID (which follows the ?hop= in the first link) and put it into the second URL (following the ? in the second link) via PHP, CGI or JavaScript?
Also, I have a script that works to copy and paste into a form, but I'm not sure how similar that is to what I'm talking about above.
Here it is..
Code: Select all
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My Net-Marketing Center Affiliate Resource Center</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css.css" type="text/css">
<script language="JavaScript" type="text/javascript">
<!--
bBool=false
var copiedtext=""
var tempstore=""
function initiatecopy() {
bBool=true;
}
function copyit() {
if (bBool) {
tempstore=copiedtext
document.execCommand("Copy")
copiedtext=window.clipboardData.getData("Text");
if (tempstore!=copiedtext) {
}
bBool=false;
}
}
// -->
</script>
</head>
<body>
<form name=theform>
<p>Your ClickBank nickname:
<input maxlength=10 size=15 name=nick>
<input onClick=javascript:go() type=button value="Generate Html" name=button>
<script>
function go()
{ x=document.theform.nick.value;
if (x.length<5){alert('Please enter your full ClickBank nickname in the blank.'); return 0;}
y=document.location.search.substring(1,11);
y='msfas';
document.theform.thelink1.value='http://hop.clickbank.net/?'+x+'/'+y;
document.theform.thelink2.value='<a href=http://hop.clickbank.net/?'+x+'/'+y+'>Click here to get My SUPER Free Ads Secret -- Advanced Series NOW!</a>';
}
</script>
</p>
<p>Here's your affiliate hoplink url:<br>
<textarea name=thelink1 wrap=soft cols=56 rows=1></textarea>
</p>
<p>Here's your affiliate hoplink in html:<br>
<textarea name=thelink2 wrap=soft cols=56 rows=3></textarea>
</p>
</form>
</body>
</html>