1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[FREE] My Custom Redirector

Discussion in 'Black Hat SEO' started by BlaqReaper, Oct 13, 2011.

  1. BlaqReaper

    BlaqReaper Junior Member

    Joined:
    Sep 7, 2011
    Messages:
    130
    Likes Received:
    207
    Hey guys, I've created a redirector that basically is a mashup of the two found on here (CPA Redirector 2, DanielJohnsons). I'm a big fan of both of theirs, but I found (in my opinion) flaws in each. With CPA-R2, I didn't like how it could only redirect one product per page and with DanielJohnson's I didn't like how it required two pages.


    Anyways, before I present my code, just a heads up: I'm fairly new at PHP (picked it up fairly fast due to background in C++), so please be careful with the script. I've only really tested it on Chrome and Firefox. I do have two requests though. Can someone who is more experience in PHP look over the code to make sure there isn't any mistakes? I used the same as fail-safe system as CPA2 and from what I've tested, any incorrect referrals end up staying on the referring page, but I've been known to be absentminded. Also, is it better to have a Javascript redirect at the end or a PHP one?

    EDIT: God damnit, how do I upload the code here? I'm fairly new and have lurked mainly and everytime I post it says something about links T_T. Also can't PM the admins either since I'm too new.

    Right, so since I can't post the code here for some reason, here's the file in text form uploaded through mediafire: mediafire_com/file/jkkm07cepsd63fa/index.txt

    Change _ to . and can someone who has the privilege please post it back here as a reply? I want to take it down eventually. Thanks in advance.
     
    Last edited: Oct 13, 2011
  2. BlaqReaper

    BlaqReaper Junior Member

    Joined:
    Sep 7, 2011
    Messages:
    130
    Likes Received:
    207
    Also, forgot to include the directions. It's pretty simple, you go in and change the magic number to any number as the same in CPA2, and host it in any directory you want for your referring page. To link to your affiliate offer you must type:

    Your domain and directory should be self-explainatory.

    Replace the first set of x's with the magic number you have in the PHP file and the second set of x's with the affiliate offer url.

    I've also set up subIDs, but am still tweaking them a bit. It should work (I'm simply testing stuff out in order to provide easy postback function in the future- once again feel free to pm me if you have advice).

    so in order to include subID, the link has to look like
    Same directions as before EXCEPT make sure to enter the url field LAST. Also two new things to fill out
    type: Fill out the subID format for the affiliate network (for instance Peerfly uses 'subid')
    idname: Fill out what you want your subID to be called.

    The great part about this is, that it should be able to attach a subID to any network as long as you filled in the correct type. If this is beyond your scope (or you don't need a subID), just use the top format.

    SORRY one last thing. At the very bottom, you have to make a landing page (but it can now be for multiple offers), because that's where your AM would end up visiting if he looks at the referrer.
     
    Last edited: Oct 13, 2011