The Most Active and Friendliest
Affiliate Marketing Community Online!

“Propeller”/  MyBid

Monetize Your Outgoing Links

M

michael pehl

Guest
Hi there.

Some time ago I have coded some simple stuff that you can use to e.g. monetize your outgoing links.

This is possible with some jQuery and PHP lines, pretty easy stuff.

CHECK OUT THE DEMO

Let's begin with some jQuery on the site with the outgoing link. I'm assuming you are using jQuery on your site.

Just add these lines after jQuery was loaded, add the class outgoinglink to the desired link.

Code:
<script>
$(window).ready(function(){
	$("a.outgoinglink").click(function(evt) {
		var href = $(this).attr("href");
		evt.preventDefault();
		window.location = './outgoing.php?url='+href;
	});
});
</script>

Example for a link:

Code:
<a href="http://bing.com" class="outgoinglink">Click Here To Visit Bing</a>

You can rename the class but make sure you are using a unique class name.

Now the outgoing.php file, basically this can be ANY site you want... there is only some lines to add.

Add these lines after jQuery was loaded.

Code:
<script>
$(window).ready(function() {

function gotoURL(){
window.location.href = '<?php echo $_GET['url']; ?>';
}

$('#defaultCountdown').countdown({
until: +6, 
format:"S", 
onExpiry: gotoURL
});
});
</script>

CHECK OUT THE DEMO

If anyone is interested in this code I would make a zip package of the demo's ...

I am using jQuery Countdown from Keith Wood in this demos, you can get it here: jQuery Countdown

If anyone wants to support me, check out this: Donate Some Cash

Thanks for reading,

Michael
 
Thank you, Oliver.

I love you, too :)

I have some more stuff to come, just need some time to prepare...
 
Michael nice work.
But i feel those days are over when people used to generously donate for people's work.
Now you should have created a WSO and sold it at $9 (just to say).
 
banners
Back