Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-24-2007, 05:27 AM   #1
ionic
Confirmed User
 
Join Date: May 2005
Posts: 443
Tip: Affiliate link redirects - Earn more money

It's friday and im in a good mood so thought i'd share this little tip with for any blog owners/site owners that have a lot of affiliate links on their pages.

If you aren't already redirecting them, well you should be and here's how:

Create a PHP file with the following code and your desired affiliate code/text.

PHP Code:
<?php

$path 
= array(
    
'reality-kings' => ' http://www.realitykings.com/main.htm?id=fapgallery&p=clean',
    
'college-fuckfest' => 'http://signupsb.triplexcash.com/cgi/click?account=560307&site=2&program=2'
    
);

if (
array_key_exists($_GET['id'], $path))
    
header('Location: ' $path[$_GET['id']]);

?>
Save it as link.php

Then in your .htaccess file (create one if you dont have one) add:
Code:
RewriteEngine On
RewriteRule ^link/([/_0-9a-zA-Z-]+)$ link.php?id=$1
Now in this example i used a realitykings.com affiliate link with the anchor text reality kings.

To include that link on my pages i would just add a link to:

http://www.domain.com/link/reality-kings

When clicked that will redirect to the sponsor link

Remember to block the /link folder in your robots.txt file

Benefits of this technique:

1. SEO benefits - google isnt fond of too many affiliate codes on landing pages and it also helps prevent bleeding or diluting of your pagerank score.

2. Prevent any pc tools or other malware stripping out or replacing your affiliate code.

3. Earn more money!
for example today's nastydollars bonus day all i did was alter a few URL's in the link.php file and now all my inthevip/vipcrew/ links all go through the reality kings tours.

Tomorrow i can just re-edit that file rather than the 100's of hard coded links on my sites.
ionic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-24-2007, 05:30 AM   #2
martinsc
Too lazy to set a custom title
 
Industry Role:
Join Date: Jun 2005
Location: 127.0.0.1
Posts: 27,047
thanks. i was wondering how to do that.
__________________
Make Money
martinsc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-24-2007, 05:32 AM   #3
ionic
Confirmed User
 
Join Date: May 2005
Posts: 443
Note:

Might not have been clear but in the link.php file you need to have a ',' after every line in url code except for the last line!
ionic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-24-2007, 09:26 AM   #4
*Fred*
Registered User
 
Join Date: Jul 2007
Posts: 69
Nice tip!
*Fred* is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-24-2007, 11:21 AM   #5
alby_persignup
Confirmed User
 
Join Date: May 2007
Posts: 3,119
thats cool! thanks
__________________
OnProbation Links Directory | OnProbation Design Services | OnProbation Cash
alby_persignup is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-24-2007, 11:27 AM   #6
hardcoreblogger
Confirmed User
 
Join Date: Jul 2006
Location: Where the wild things are
Posts: 761
seems quite complicated to me, why not just put a simple redirect in htaccess?
__________________


hardcoreblogger is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 09-07-2007, 05:33 AM   #7
Oracle Porn
Affiliate
 
Oracle Porn's Avatar
 
Industry Role:
Join Date: Oct 2002
Location: Icq: 94-399-723
Posts: 24,433
Quote:
Originally Posted by hardcoreblogger View Post
seems quite complicated to me, why not just put a simple redirect in htaccess?
if that's complicated you must be a true idiot!

thank you very much for the code appreciated!
__________________


Oracle Porn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 12:27 PM   #8
Stomped
Confirmed User
 
Join Date: Nov 2003
Location: Argentina
Posts: 1,105
Didn't worked with me
It shows a 404 error always...
__________________
email: admin {AT} estomped [DOT] com
Stomped is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 12:50 PM   #9
Iron Fist
Too lazy to set a custom title
 
Join Date: Dec 2006
Posts: 23,400
Quote:
Originally Posted by hardcoreblogger View Post
seems quite complicated to me, why not just put a simple redirect in htaccess?
that's what I do... no need for extra overhead processing some PHP file...every cycle counts!
__________________
i like waffles
Iron Fist is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 01:17 PM   #10
Mike Semen
Confirmed User
 
Mike Semen's Avatar
 
Join Date: Dec 2001
Location: London Town
Posts: 2,924
Quote:
Originally Posted by sharphead View Post
that's what I do... no need for extra overhead processing some PHP file...every cycle counts!
Care to share how you do it then?

__________________
ICQ 1454 81 522 |
Mike Semen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 01:27 PM   #11
candyflip
Carpe Visio
 
candyflip's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: New York
Posts: 43,064
Thanks for the tip.
__________________

Spend you some brain.
Email Me
candyflip is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 01:33 PM   #12
Jdoughs
Confirmed User
 
Jdoughs's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
I'd love for everyone to adopt this.

Would increase the weight on my referal codes bigtime.
__________________
LinkSpun - Premier Adult Link Trading Community - ICQ - 464/\281/\250
Be Seen By New Webmasters/Affiliates * Target out webmasters/affiliates based on niches your sites are for less than $20 a month.
AmeriNOC - Proudly hosted @ AmeriNOC!
Jdoughs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 02:05 PM   #13
Diligent
Confirmed User
 
Diligent's Avatar
 
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
Quote:
Originally Posted by Mike Semen View Post
Care to share how you do it then?


Take the above PHP code, modify it like this:

Code:
<?php

$path = 'http://www.YourSponsor.com/?affiliate=You&site=NastySite'
header('Location: ' . $path);

?>
Then rename the PHP file to YourSponsor-NastySite.php ...
... and keep one PHP file like this for each site promoted in a central directory, like /links, and call them accordingly

Doesn't cut out PHP usage... but it'll save some cycles ;)
__________________
~¤~ MORE MONEY ~¤~ VOD? XoD! ~¤~
~¤~ ICQ# 9828 2461 ~¤~

Diligent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 02:22 PM   #14
Diligent
Confirmed User
 
Diligent's Avatar
 
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
*NO* PHP at all btw:

Create subdirectories for each "promotion target" in the /links directory, like /links/YourSponsor-NasySite/ ...
... and stuff this into each subdirectory's .htaccess (this will need editing each subdir's htaccess for the appropiate redirection target):

Code:
RewriteEngine On
RewriteRule ^.*$ http://www.YourSponsor.com/?affiliate=You&site=NastySite
__________________
~¤~ MORE MONEY ~¤~ VOD? XoD! ~¤~
~¤~ ICQ# 9828 2461 ~¤~

Diligent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 02:27 PM   #15
Diligent
Confirmed User
 
Diligent's Avatar
 
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
Actually scratch my previous post, and use this instead:
(corrected a couple of errors, including making it slightly more SE friendly)

Code:
RewriteEngine On
RewriteRule ^$ http://www.YourSponsor.com/?affiliate=You&site=NastySite [R=301,L]
__________________
~¤~ MORE MONEY ~¤~ VOD? XoD! ~¤~
~¤~ ICQ# 9828 2461 ~¤~


Last edited by Diligent; 03-09-2008 at 02:30 PM..
Diligent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 02:46 PM   #16
bDok
Confirmed User
 
bDok's Avatar
 
Join Date: Feb 2005
Location: SD/OC/LA
Posts: 1,917
nice tip.
Take it to the next level and create a database of the links.

So then you can have a nice control panel that handles it all.
__________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Warriors come out to plaAAaayyy!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
bDok is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 02:54 PM   #17
Diligent
Confirmed User
 
Diligent's Avatar
 
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
bDok: niiice thinking!
__________________
~¤~ MORE MONEY ~¤~ VOD? XoD! ~¤~
~¤~ ICQ# 9828 2461 ~¤~

Diligent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 02:59 PM   #18
kmanrox
aka K-Man
 
kmanrox's Avatar
 
Industry Role:
Join Date: Oct 2001
Location: The Gutter
Posts: 29,292
its a very good tip... mainly the reasoning on how its easy to swap out hundreds of links easily.... although you could search and replace in your database too if need by...

i've always liked this 100&#37; automatic plugin;

http://w-shadow.com/blog/2007/07/28/...for-wordpress/

I know it doesnt give you easy control over where the links point, but i have a technical background and a couple programmers on staff that im sure would easily search and replace (grep) if i ever needed... never needed to though.
__________________
Crypto HODLr
Crypto mining
Angel investor
kmanrox is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 03:49 PM   #19
Mike Semen
Confirmed User
 
Mike Semen's Avatar
 
Join Date: Dec 2001
Location: London Town
Posts: 2,924
Awesome tips. Thanks Diligent.

I might well be dreaming that this happened - a useful thread on GFY. Wow.
__________________
ICQ 1454 81 522 |
Mike Semen is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 04:21 PM   #20
Jens Van Assterdam
The Dupre Pimp
 
Jens Van Assterdam's Avatar
 
Join Date: Feb 2008
Location: Koh Samui
Posts: 6,677
great tip,was searching for something like this
__________________
Read TOS for signature rules
Jens Van Assterdam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 04:43 PM   #21
Diligent
Confirmed User
 
Diligent's Avatar
 
Join Date: Aug 2003
Location: Hoy Suecia, mañana Nirvana
Posts: 1,594
Thanks for the thanks guys, useful stuff is always nice eh?
(Keep gratiuty in store for ionic as well though, he initiated this stuff here)

Which brings me to correct my first post in this thread, can't believe how sloppy I was with the code hehe:

If You wanna go the PHP route, the way I suggested, I missed an important semicolon.. so here we go again, fully correct this time:

Code:
<?php

$path = 'http://www.YourSponsor.com/?affiliate=You&site=NastySite';
header('Location: ' . $path);

?>
(Semicolons are needed at the end of pretty much each instruction line in PHP)
__________________
~¤~ MORE MONEY ~¤~ VOD? XoD! ~¤~
~¤~ ICQ# 9828 2461 ~¤~


Last edited by Diligent; 03-09-2008 at 04:46 PM..
Diligent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 05:27 PM   #22
FlexxAeon
Confirmed User
 
FlexxAeon's Avatar
 
Industry Role:
Join Date: May 2003
Posts: 3,765
so google prefers redirects over ref codes?
__________________
flexx [dot] aeon [at] gmail
FlexxAeon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 05:45 PM   #23
Iron Fist
Too lazy to set a custom title
 
Join Date: Dec 2006
Posts: 23,400
Quote:
Originally Posted by Mike Semen View Post
Care to share how you do it then?

Sure...

RewriteEngine on
Options +FollowSymlinks
RewriteRule ^go/ladyboygold/ http://join.ladyboygold.com/track/NzkwOjk6Ng/ [R=301,NC]


then go to http://www.yourdomain.com/go/ladyboygold/ and apache automatically redirects to the url above. I've tested this with join links, test signups and such and this method works the best. Granted the .htaccess file can get to be a bit large, its still better than running PHP that essentially does the same thing.
__________________
i like waffles
Iron Fist is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 06:56 PM   #24
Tempest
Too lazy to set a custom title
 
Industry Role:
Join Date: May 2004
Location: West Coast, Canada.
Posts: 10,217
In the long run, the ionic method is far better from an updating standpoint when you run a ton of sites on many different servers... here's another tip on how to use this (been doing this myself for 3 years now)... If you have multiple sites on one server, create a common directory somewhere...

example.

/www/domain1.com/html
/www/domain2.com/html
/www/domain3.com/html
/www/domain4.com/html
/www/links <- create this one.

Now put that links.php file in that directory. i.e.:
/www/links/links.php

Now for each of your sites, you simple put a links.php file in there that includes that core file (as well as the .htaccess file). i.e.
/www/domain1.com/html/links/links.php
/www/domain2.com/html/links/links.php
/www/domain3.com/html/links/links.php
/www/domain4.com/html/links/links.php
/www/links/links.php <- core file

the links.php file for each domain just has the following in it:
<?php @include('/www/links/links.php'); ?>

Now you only have to update one file per server and ALL your sites are updated at once.

That code can be expanded like crazy to add in campaign tracking per site, log the clicks or whatever... the only issue is that you will end up with 1000s of links in that file which will make it very big.. At that point you need to start breaking it up into sections. Could be done per sponsor. eg:

these ones contain all the links:
/www/links/nastydollars.php
/www/links/bangbros.php
/www/links/topbucks.php

then each site could be
/www/domain1.com/html/links/nd/links.php
/www/domain1.com/html/links/bbo/links.php
/www/domain1.com/html/links/tb/links.php

And those links files include the approriate sponsor core link file. You'll need to adjust the .htaccess file for the correct path.

Couple other things.. You should send a proper 404 if the script fails etc. So I'd mod it like this and also do a couple things to try and cut down on the size of the file when you start adding more and more links..

Code:
<?php
	$key = (isset($_GET['id']) ? trim($_GET['id']) : '');
	if( $key == '' ){
		do404();
	}
	$links = array(
		'reality-kings' => 'www.realitykings.com/main.htm?id=fapgallery&p=clean',
		'college-fuckfest' => 'signupsb.triplexcash.com/cgi/click?account=560307&site=2&program=2'
	);
	if( isset($links[$key]) ){
		$url = (substr($links[$key], 0, 4) == 'http' ? $links[$key] : 'http://'.$links[$key]);
		header("Location: $url");
		exit;
	}
	do404();

function do404(){
	header('HTTP/1.1 404 Not Found');
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL was not found on this server.
</BODY></HTML>
<?php
	exit;
}
?>
Tempest is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 07:10 PM   #25
Iron Fist
Too lazy to set a custom title
 
Join Date: Dec 2006
Posts: 23,400
The same can be done for custom galleries... just put symbolic links to your other image directories and then put in different header/footer images in that specific virtual directory and you've duplicated the content without wasting space
__________________
i like waffles
Iron Fist is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 09:21 PM   #26
papill0n
Unregistered Abuser
 
Industry Role:
Join Date: Oct 2007
Posts: 15,547
Quote:
Originally Posted by Diligent View Post
Actually scratch my previous post, and use this instead:
(corrected a couple of errors, including making it slightly more SE friendly)

Code:
RewriteEngine On
RewriteRule ^$ http://www.YourSponsor.com/?affiliate=You&site=NastySite [R=301,L]
I like that
papill0n is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-09-2008, 09:27 PM   #27
qxm
Confirmed User
 
Join Date: Jul 2006
Location: NoHo
Posts: 5,970
I'm shocked! An actual useful thread in GFY!! .............the world is coming to an end.......bookmarked since this happens once every million posts
__________________

ICQ: 266990876
qxm is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.