This script will mask the links on your website. This is important if you do any affiliate marketing. Google will only display one ad at a time per display URL. That means if you are direct linking to an offer and a competitor is doing the same, your ads will not be shown at the same time. Also, it's been rumored that the major search engines will compare your links with their database of "known affiliates", and will penalize you in the form of high minimum bids. Don't worry though, this simple little script will "mask" (cloak) your links so that all the search engines (and users) see is something like www.yoursite.com/out.php?id=google
Instructions
- 1. Copy and paste the script below into an empty php file (our example was called out.php)
- 2. Edit the section that says "edit your links here!"
The format is as follows:
"link_id" => "http//www.your_link_goes_here.where "link_id" is the id you pass in the URL like:
www.yoursite.com/out.php?id=link_id
Notice that there is a comma at the end of each line EXCEPT the last one!
<?php /** * Link Cloaking Script -- (C)2008 PlasticBrain Media LLC * www.plasticbrain.net * --------------------------------------------------------- * Edit the "links" section below. Format them like: * "link_id" => "http//www.your_link_goes_here.com" * * where "link_id" is the id you pass in the URL * www.yoursite.com/out.php?id=link_id * * if you need help visit us at www.plasticbrain.net * --------------------------------------------------------- */ $links = array( // -- edit your links here! -- Notice that there is a comma after each entry EXCEPT the last one!!! '1' => 'http://www.your_link_here.com', '2' => 'http://www.another_link_here.com', '3' => 'http://www.link.com' // -- Stop editing here! -- ); $id = $_GET['id']; header( 'Location:'.$links[$id] ); exit; ?>
Download the source: link-cloaking-script.php.txt
Contact Us
- [P] 1-901-213-7881
- [F] 1-901-328-4522
- [E] Contact Us