elbuhleini 0 Newbie Poster

Hi,

N00b in need for some help :)

I would like to do this: our affiliate inputs an url of his choice and submits. The script gives him our app with his affID embeded in it. When his visitor installs this app, he is redirected to url, which was submitted before.
Here is my Js code so far, but I am not good in php, so how to create that (download.php) code to pass affID and url redir? Pls, help!

<TABLE cellPadding=10 width='555' border=0 style='border-collapse: collapse' bordercolor='#111111' cellspacing='0' align=center>
        <TR>
          <TD width='635'>
            
            <script>
	function update(){
		var yourcontent = document.getElementById('yourcontentid').value;
		if(!yourcontent) {
		    alert('you have to enter a valid content url');
			return false;
		}
		var url = 'http://sub.domain.com/download.php?affID=<?php echo urlencode($_POST['affID']); ?>">&content='+yourcontent;
		var dl = document.getElementById('downloadid');
	    dl.src = url;
	}
</script> 
<iframe src='' id='downloadid' width=0 height=0></iframe>
<TABLE cellSpacing=0 cellPadding=5 width='622' border=1 height='137'>
              <TBODY>
              <TR bgColor=#cccccc>
                <TD height='1' width='608'>

               Protect your own content<BR>
                <span class='text'><b>
                <span lang='bg'>Type </span>: </b>YourContent<b></TD></TR>
              <TR>
                <TD height='120' width='608'>
                Your content url:<input id='yourcontentid' type='test' name='yourcontent'><br><Br>

                <input type='button' value='Download Your Content exe' onclick='javascript:update();'> <BR><BR>
          
                You can fill in any url you like to protect like a movie or a website, for example 'http://www.yoursite.com/content/' or 'http://www.yoursite.com/movies/movie.mpg'<BR><BR>
                The exe will install Xposio and redirect to the url of your choice.<br>
                You can make as many content executables as you wish.
                <BR></TD></TR></TBODY></TABLE>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.