Results 1 to 2 of 2
October 6th, 2004, 11:40 PM #1
- Join Date
- January 18th, 2005
Hi there! I' realy a newbie at php. I want to protect my links using php. Here's an example:
Originaly my merchant links would look like this:
What do I need to do to make it look like this:
October 7th, 2004, 05:21 AM #2
There are several ways to do this Marito, they all involve writing a script called offers.php that has a simple redirect in it.
in PHP, that redirect looks like this:
// the url you want to go to is in $url
The different methods surround how you get the correct URL in there.
If you have all of your links in a database like MySql with ID's, then you do a database lookup on the link ID, 25 in your example, and put the url in the $url variable before calling the redirect.
Another method is to hide the LS link in the script and call the redirect with the id that's unique to the LS link, the offerid portion. Chez Noir shared a good way to do that here.
Another way to do it is to put the destination link right in the url as a querystring parameter. That in itself doesn't accomplish the hiding part, but you can obscure it. There's a Link masking tutorial at Adblock.org that's been discussed here a few times.
By alphawave in forum Commission Junction - CJReplies: 8Last Post: January 25th, 2011, 08:37 PM
By alphawave in forum Google Affiliate Network - GANReplies: 1Last Post: January 24th, 2011, 04:44 PM
By easylife in forum Midnight Cafe'Replies: 8Last Post: March 26th, 2009, 09:39 PM
By kreasor in forum Programming / Datafeeds / ToolsReplies: 2Last Post: August 22nd, 2008, 12:04 PM
By Chopper in forum Programming / Datafeeds / ToolsReplies: 0Last Post: April 20th, 2005, 08:06 AM