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

[Share] Great Script for anyone incentivizing CPA offers

Discussion in 'CPA' started by Dev-Gank, Oct 1, 2008.

  1. Dev-Gank

    Dev-Gank Regular Member

    Joined:
    Jul 17, 2008
    Messages:
    216
    Likes Received:
    48
    I mentioned this script in a couple other threads in the CPA section and there seemed to be a fairly high interest in it, so I decided to make a new thread here so everyone can benefit from it.

    Also, I did NOT write this script myself, I am simply posting it here and giving you some ideas on how to use it. Full credit for this script goes to agj32mrgibbits from this forum.

    Basically, what this script allows you to do is to create a single ad on your advertising network while still letting you edit and rotate your offers. This also allows you to show the ad network a different page until your ad is approved - I know some people keep getting denied so this should help with that.

    For example, if you are incentivizing non incent offers, your conversion rate is probably much higher than you would want it to be in order to stay safe, and this is where this script can help you especially if you need to do this for many offers.

    Here are the instructions:

    1. Save it as tracker.php or track.php or something that sounds like a traffic tracker.

    2. Create a sites.txt in the same directory as the php file and enter ALL of your CPA offers you are using (one per line)

    3. Upload them to your server, preferably your site's main directory.

    4. When adding it to Findology make the URL be like "http://example.com/track.php?id=2932" so that it looks like you actually have tracking setup for a campaign.

    5. Once Findology has approved your ad you can change $go=false; to $go=true; and re-upload it so that it will now show a random CPA offer from sites.txt instead of showing your website.

    If this helps you out please show some love!

    Code:
    <?php 
    //once findology approves your ad set this to true and re-upload it 
    $go=false; 
    
    //fake website, could be your blog with the CPA offer links on it, make sure you have content 
    $site='http://www.example.com'; 
    
    $sites=explode("\n",file_get_contents('sites.txt')); 
    $redirect = $sites[array_rand($sites)]; 
    $aff_link = "$redirect";  
    
    if($go==true||$_REQUEST['trkid']==12){ 
        if($_REQUEST['trkid']!=12){ 
            echo '<meta http-equiv="refresh" content="0;url=track.php?trkid=12">'; 
        }else{ 
            $referer = $_SERVER['HTTP_REFERER']; 
    
            if($referer == "" || strpos($referer,$_SERVER['HTTP_HOST'])) { 
             echo '<meta http-equiv="refresh" content="0;url='.$aff_link.'">'; 
            }else{ 
                echo '<meta http-equiv="refresh" content="0;url='.$site.'">'; 
            } 
        } 
    }else{ 
        echo '<meta http-equiv="refresh" content="0;url='.$site.'">'; 
    } 
    ?>
     
    • Thanks Thanks x 14
    Last edited: Oct 1, 2008
  2. Dev-Gank

    Dev-Gank Regular Member

    Joined:
    Jul 17, 2008
    Messages:
    216
    Likes Received:
    48
    yes if you are using this along with black hat attack it goes in your blog site. I'm glad you were able to get accepted so quickly.
     
  3. cnwelf

    cnwelf Regular Member

    Joined:
    May 17, 2008
    Messages:
    294
    Likes Received:
    29
    Occupation:
    seek for Cpa accounts
    Location:
    next to you
    tks Dev-Gank again

    I will run in my website soooooooooooooon
     
  4. frenchboy

    frenchboy Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 19, 2008
    Messages:
    643
    Likes Received:
    1,276
    I had it already and it's working great
     
  5. maxbht

    maxbht Registered Member

    Joined:
    Jul 26, 2008
    Messages:
    62
    Likes Received:
    123
    hello

    I saw you Guys mentioned Black Hat attack method. I am planing to start as soon as i get my internet connection back at home because I dont have time for that at my work.

    Can you please share your experience with BHA, can it really make you start earning in the first day of using it, and how do you choose your keywords if you are using ppc.

    And what is Findology.

    I would really appreciate your help.

    thanks
     
  6. Dev-Gank

    Dev-Gank Regular Member

    Joined:
    Jul 17, 2008
    Messages:
    216
    Likes Received:
    48
    I have had a great experience so far. It took me about a week or two before I found niches that were profitable, but once I did it started paying off well. With any type of PPC, it still comes down to niche research and great keywords, so it still takes some good solid effort.

    Findology is an advertising company that some of us use to send junk traffic to our offers to lower the conversion rates.
     
  7. Loak

    Loak Jr. VIP Jr. VIP

    Joined:
    Apr 21, 2008
    Messages:
    314
    Likes Received:
    109
    thats a cool script, thanks for sharing
     
  8. Dev-Gank

    Dev-Gank Regular Member

    Joined:
    Jul 17, 2008
    Messages:
    216
    Likes Received:
    48
    No problem - Glad you got it worked out.
     
  9. Siek

    Siek Regular Member

    Joined:
    Feb 4, 2008
    Messages:
    456
    Likes Received:
    294
    so this is bascially a URL rotator for junk traffic? I've never used findolgy before is it just any other traffic distibutor or what is it? i checked it up but didnt find anything about traffic etc.. perhaps i hit the wrong site.. lol
     
  10. vtspot

    vtspot Newbie

    Joined:
    Feb 27, 2008
    Messages:
    25
    Likes Received:
    4
    So, does it mean that traffics from Find*dolo*gy do not convert?
     
  11. Dev-Gank

    Dev-Gank Regular Member

    Joined:
    Jul 17, 2008
    Messages:
    216
    Likes Received:
    48
    Ya they are not meant to convert. It is just search engine traffic and priced at .01 per view. It also registers pretty well as clicks for CPA offers, so thats why alot of people use it.
     
  12. Siek

    Siek Regular Member

    Joined:
    Feb 4, 2008
    Messages:
    456
    Likes Received:
    294
    Ahh i see how this works now... any specific requirements findology needs in terms of site approval?
     
  13. Dev-Gank

    Dev-Gank Regular Member

    Joined:
    Jul 17, 2008
    Messages:
    216
    Likes Received:
    48
    Not that I know of. Just give it a shot.
     
  14. maxbht

    maxbht Registered Member

    Joined:
    Jul 26, 2008
    Messages:
    62
    Likes Received:
    123
    that is my bigest problem.

    i understand all tactics but i dont know how to find profitable niche and great keywords. can find good manual for that.

    I know i must use long tail keywords for ppc is it same for CPA.

    could you post some links with manuals for finding good niche and keywords.

    thanks
     
  15. Dev-Gank

    Dev-Gank Regular Member

    Joined:
    Jul 17, 2008
    Messages:
    216
    Likes Received:
    48
    I dont have a manual - all I can say is experiment really. It took me a while of losing money before I was profiting.

    Its just like all things in life.
     
  16. Nigel

    Nigel Newbie

    Joined:
    Jun 30, 2008
    Messages:
    16
    Likes Received:
    96
    i am using double meta refresh at this moment. can i use this script along with it? I like this tool for offer rotation.

    see if this works.............

    this is my double meta refresh 1st.php

    this is my double meta refresh 2nd.php

    notice the bold http://www.mydomain.com/track.php in 2nd.php, this is the url that run this script. Can I use these coding exactly as they are? Please advice. Once i have green light from you, I'll use it for my campaign.

    In short, I want to hide my domain ( with double meta refresh) at the same time I need auto-rotation ( with this script).

    thanks much
     
  17. Dev-Gank

    Dev-Gank Regular Member

    Joined:
    Jul 17, 2008
    Messages:
    216
    Likes Received:
    48
    Im not really a PHP coder, but it seems like it could work like that. You may want to get a second opinion though, as I did not write the above code, I just made it work for me and wrote this up for other people to make use of it.

    Let me know what you find out.
     
  18. leber026

    leber026 Newbie

    Joined:
    Aug 7, 2008
    Messages:
    30
    Likes Received:
    5
    Occupation:
    Programming
    Location:
    Ohio
    Nigel,
    This is what I notice in your code.
    - It is doing a double redirect.
    - You are not doing any random redirection with the code you provided on page 2 (listed below)

    My Thoughts are that the you are choosing a random page based on the array $mypages. Since this array only contains 1 url (http://www.mydomain.com/track.php) it will always produce the result 0. Im guessing when you run the code below it will always redirect to http://www.mydomain.com/track.php. From what I see i would eliminate some of this code. I would remove the following lines
    $page1 ="http://www.mydomain.com/track.php";
    $mypages = array($page1);
    $myrandompage = $mypages[mt_rand(0, count($mypages) -1)];

    I'm also noticing that if you have a url like http://example.com/track.php?id=2932 comming to your site from findology your code would not pass the query through correctly. Let me try to work on some code for you. I will be traveling this weekend. So if anyone else has a quicker(or better solution) hopefully they will help. Let me know if you have any questions.
    Code:
    <?php
    $page1 ="http://www.mydomain.com/track.php";
    $referer = $_SERVER['HTTP_REFERER'];
    $mypages = array($page1);
    $myrandompage = $mypages[mt_rand(0, count($mypages) -1)];
    if($referer == "")
    {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=$myrandompage\">";
    }
    else
    {
    echo "<meta http-equiv=\"refresh\" content=\"0;url=1st.php\">";
    }
    ?> 
     
  19. leber026

    leber026 Newbie

    Joined:
    Aug 7, 2008
    Messages:
    30
    Likes Received:
    5
    Occupation:
    Programming
    Location:
    Ohio
    Nigel,
    Sorry it took so long to get back to you. After looking over the code again the answer appears a little easier. It looks like Dev-Gank's code keeps redirecting to itself until it sees a a query string trkid=12. it then check if the referral is blank and redirects to an affiliate link in sites.txt So I would set it up this way.

    track.php (Dev-Gank's code)
    Code:
    <?php
    echo "<meta http-equiv="refresh" content="0;url=track2.php">";
    ?> 
    which will redirect to
    track2.php
    Code:
    <?php 
    //once findology approves your ad set this to true and re-upload it 
    $go=false; 
    
    //fake website, could be your blog with the CPA offer links on it, make sure you have content 
    $site='http://www.example.com'; 
    
    $sites=explode("n",file_get_contents('sites.txt')); 
    $redirect = $sites[array_rand($sites)]; 
    $aff_link = "$redirect";  
    
    if($go==true||$_REQUEST['trkid']==12){ 
        if($_REQUEST['trkid']!=12){ 
            echo '<meta http-equiv="refresh" content="0;url=track2.php?trkid=12">'; 
        }else{ 
            $referer = $_SERVER['HTTP_REFERER']; 
    
            if($referer == "" || strpos($referer,$_SERVER['HTTP_HOST'])) { 
             echo '<meta http-equiv="refresh" content="0;url='.$aff_link.'">'; 
            }else{ 
                echo '<meta http-equiv="refresh" content="0;url='.$site.'">'; 
            } 
        } 
    }else{ 
        echo '<meta http-equiv="refresh" content="0;url='.$site.'">'; 
    } 
    ?>
    You will need to create a file called sites.txt that contains all your affilite links an you need to change http://www.example.com in the above code.

    hope fully this helps.

    - leber026
     
    • Thanks Thanks x 1
  20. Syowred

    Syowred BANNED BANNED

    Joined:
    Jun 9, 2008
    Messages:
    53
    Likes Received:
    15
    Awesome leber026 it works a charm.