It’s Here! Why are you trying so hard to cloak Facebook?! Part 2: The Tool, Mega Post!

Sunday, September 14, 2008 18:36

Yeah yeah, I know, a week late right?  Better later than never!  You can now download the facebook cloaking script V1.  It’s not overly pretty, but its the first version.  I’ll be refining it over the course of a few weeks.

If you signed up under me for any of the Affiliate Networks listed here on my blog you can get releases sooner.  So get a hold of me if you did sign up under me, or after you get approved and I’ll get you on the mailing list.  Otherwise you may have to wait a week or two longer to get your hands on it.

If you have any suggestions post a reply here, or send me an e-mail: brad [at] madppc [d0t] com.

Installation and Usage:

This tutorial will focus on using, cPanel back end, with phpMyAdmin.  The basic principals stay true for any other system.

1.  From your main cPanel click on MySQL Databases.

2. Create a new database, in this case I’ll use ‘tracking’.  You can name it whatever you want.

3.  Give your MySQL username ALL privlages to the table you just created.

4.  Continue on to phpMyAdmin.

5.  On the left side you’ll see your database, click on it.  The on the top bar click Import.  Time to import our database file.

6. Click the Browse... button.

7.  Select the file tracking.sql from the facebookcloaker folder.

8.  Click Go.

9.  Everything should go good, and you should see this message.  Now we have to create an entry in our options table so that we can set our options later.

10.  Click on Options.

11. Click on Insert.

12. Fill out the form as seen and click Go.  Entry should be created.

13.  Upload the other files to your server, track.php should be outside the folder main.

14.  Just a reiteration of #13.

15.  We have to password protect the main folder so that someone can’t access our scripts.  Go back to the homepage of cPanel and click Password Protect Directories.

16.  Check the box with the lock next to it.  Enter something into the text box, this test will show in the titlebar the the window where you enter your username and password to access the directory.  Click Save.

17. Enter the User Name and Password you will use to access that area, click Add/modify authorized user.

18.  You will know it worked when you see your User Name in list box.

19.  Open file connect.php. Fill out your SQL database details.  Username, Password, and Database Name from top to bottom.  I do this when the file is already on the server, but you can do it before hand and then upload it will everything filled out.  Your choice.

20.  Fireup your browser and go to options.php and fill in the details:

Example link that would be created from above image details:  http://www.tracking.com/track.php?test=eX543

  1. Link Variable: The variable used to pass in the encoded link value.
  2. Domain:  The path to your tracking script. No http:// and no / after .com or whatever extension your domain has.
  3. File: When you first install the script, the script that does the redirecting is named track.php.  Enter track.php if you haven’t changed it - however if you do decide to change it just put that file name here.

20. Click Options on the menu bar, if the fields are not filled out, then you know you did something wrong or didn’t fill in the right values in connect.php in step 19.

21.  Click Admin, and just for illustrative purposes we’ll set up an example link so you can see the process.

In the Offer Link field, put your actuall affiliate link, or whatever link your actually want to go to.  In the Cloak Link field enter the url where you want to send the bad bad facebook interns to.  Do not use http:// the script will add it on the fly.  For the Offer link, if you want to pass a value, make sure the passing variable is on the end of the url.

22.  Just an overview of all the different parts of the Admin Page by number.

  1. Delete - Lets you delete the links from the database, pretty simple.
  2. Activate - Used to activate either link, only one can be active at a time, but doesn’t necessarily dictate that a user will be directed through that link.
  3. Target URL [offer] - The actual URL for either the Offer Link or Cloak Link.  Click on the and they will open in a new window.
  4. Target URL [cloak] - The actual URL for either the Offer Link or Cloak Link.  Click on the and they will open in a new window.
  5. Redirect URL - The actual URL you should use on Facebook.
  6. Status - Either Active or Not Active.  Depending how you have it set.
  7. Capture - Logs the IP and Referer for anyone coming though the link.  You only need to click one or the other and it will capture the information for both.  Toggles Capture/UnCapture.
  8. Cloak - Anytime someone comes through the link and their IP or Referer are in the database they will be taken to the Cloak Link, otherwise they will go to the Offer Link.  Toggles Cloak/UnCloak.
  9. Cloak All [not numbered] - The mother of all links, causes ALL links to be in cloaked mode.  NOTE: YOUR LINKS WILL NOT SHOW THERE BEING CLOAKED, YOUR ONLY INDICATION IS IT WILL SAY Uncloak ALL.

23.  Clicking on Captured Data will show you all IPs and Referers in the database, you can delete them from there, pretty strait forward.

How to Build a Good List of IPs and Referers:

It’s pretty simple, Activate your Cloak Link, and click Capture in that row.  Go make your ad on Facebook, and wait till it gets approved.  Someone should have come through to check out the ad so you will have logged their IP and Referer.  When the ad is approved, click on Capture again to de-activate it.  Switch the active link by clicking Activate in the row where your Offer Link is.  If you want click Cloak in that row and it will automatically cloak based on details captured in the database.

Once you have enough entry’s into your database you’ll be able to throw your ads on autopilot, but it will probably take quite a few ads to get to that point.

There you guys go, enjoy it!  If you have an suggestions feel free to get ahold of me or comment here.

You can leave a response, or trackback from your own site.


13 Responses to “It’s Here! Why are you trying so hard to cloak Facebook?! Part 2: The Tool, Mega Post!”

  1. Wes (MasterlessSamurai.com) says:

    September 18th, 2008 at 10:14 am

    Hey man nice theme! Where can I get it? :)

  2. Brad says:

    September 20th, 2008 at 11:51 am

    Errr, I don’t remember, I’d have to hunt it down.

  3. Andrew says:

    November 2nd, 2008 at 10:54 pm

    Shit man, nice stuff.
    Very nice!

    @ Wes:
    Theme is over here…
    http://www.uniqueblogdesigns.com/blog/2008/free-premium-wordpress-theme-ubd-moneymaker-theme/

  4. JakeLee says:

    November 4th, 2008 at 4:55 pm

    Hey, Does this still work? I just set it up and facebook approved my ads but there info is not showing up in the captured screen. If I click through the link all my info is there but nothing came after faecbook interns looked at my ads….

  5. JakeLee says:

    November 4th, 2008 at 7:34 pm

    aww my bad, I got it working now. Great cloaking script thanks!

  6. Q&A: Facebook Cloaking Tracking SubID with A4D? Prosper202 is like a Shamwow! | Mad PPC says:

    November 14th, 2008 at 2:27 pm

    [...] rockin your script to hide referral data [refering to this post] that I got off your site last week, I just got setup on ads 4 dough and wanted to know if you [...]

  7. SinauCuk.com » Blog Archive » Semua Tentang Face Book Ads Bagian 3 says:

    November 27th, 2008 at 10:05 am

    [...] Kalau mau cara yang canggih dikit bisa juga cloaking berdasarkan IP, bisa dilihat di sini. [...]

  8. Neil says:

    December 11th, 2008 at 10:49 am

    Yo brad, Love this script.
    It works great on my HostGator account, but I just set it up on my VPS at liquedweb and it does not capture the Referral or IP. Any suggestions?

  9. Brad says:

    December 13th, 2008 at 3:11 am

    No one has said otherwise, and I know that their have been quite a few others that have used it. Make sure you have PHP5 enabled.

  10. justin says:

    December 23rd, 2008 at 12:21 pm

    im going to the referral link but its giving me a 404 error

  11. Brad says:

    December 23rd, 2008 at 12:56 pm

    Can’t provide too much with tech support except make sure your sever is PHP5 and you follow the instructions exactly.

  12. By Special Request: How to Fix the FB Cloaker | Mad PPC says:

    January 5th, 2009 at 1:32 pm

    [...] I haven’t posted much, and a WF member needed some help on the FB cloaker.  What happened was he changed hosts and they didn’t move his DB over so he lost all his [...]

  13. cpaking says:

    February 6th, 2009 at 4:43 pm

    anyone else have problems with the IP and referral just change line 18/19 to below.

    $ip = $_SERVER['REMOTE_ADDR'];
    $referer = $_SERVER['HTTP_REFERER'];

Leave a Reply