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

Simple php url rotator

Discussion in 'Black Hat SEO' started by stoaf88, Apr 7, 2009.

  1. stoaf88

    stoaf88 Regular Member

    Joined:
    Nov 1, 2008
    Messages:
    243
    Likes Received:
    35
    I have searched the forum and cant find the code for a simple php rotator that does not double meta refresh.

    I am not concerned about referrer, does anyone know the code for a simple url rotator in php?

    I will rep anyone who can help me with this.
     
  2. Entrepreneur

    Entrepreneur Regular Member

    Joined:
    Oct 12, 2007
    Messages:
    438
    Likes Received:
    379
    I have posted one up here before that i used to use. I'll have a quick butchers for you and then post a link. Did you want it to rotate on a specific basis or is random ok? I'm sure my one was/is random you see! But it does work on as many URLs as you want. :)
     
  3. darkstar69

    darkstar69 Jr. VIP Jr. VIP

    Joined:
    Nov 15, 2008
    Messages:
    806
    Likes Received:
    880
    Occupation:
    Big Boss
    Location:
    On The Dark Side
    here you are...
    a very simple to setup random url rotator.

    greets, darkstar69
     

    Attached Files:

    • Thanks Thanks x 11
  4. stoaf88

    stoaf88 Regular Member

    Joined:
    Nov 1, 2008
    Messages:
    243
    Likes Received:
    35
    darkstar thanks for the rotator rep added.

    unfortunately it is not what I need

    I need the link to be just domain.com not domain.com/urlrotator because it is for type in traffic

    @entrepreneur random is fine just need it to be in the index page like I said

    I have a rotator that will do this but it does a DMR and I dont really want to do one.
     
  5. cmiddlet78

    cmiddlet78 Registered Member

    Joined:
    Mar 13, 2008
    Messages:
    60
    Likes Received:
    20
    I am looking for one also.
     
  6. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,879
    Likes Received:
    1,932
    Save urlrotator.php as index.php and then link to your main domain
     
    • Thanks Thanks x 1
  7. photoads

    photoads Regular Member

    Joined:
    Jan 16, 2007
    Messages:
    280
    Likes Received:
    96
    Try this from prosper202
    need to create a text file count.txt and chmod 777

    Code:
    <?
    
    //Tracking202 Offer Rotation Script
    
    //enter your affiliate urls below, you can enter as many as you want, please
    //make sure that you have the affiliate url with the SUBID syntax at the end
    //of it, for reference goto: subids.com for more information.
    $offer[1] = 'http://myaffiliateurl.com?subid=';
    $offer[2] = 'http://myaffiliateurl2.com?subid=';
    $offer[3] = 'http://myaffiliateurl3.com?subid=';
    
    //this is the text file, which will be stored in the same directory as this file, 
    //count.txt needs to be CHMOD to 777, full privlledges, to read and write to it.
    $myFile = "count.txt";
    
    //open the txt file
    $fh = @fopen($myFile, 'r');
    $offerNumber = @fread($fh, 5);
    @fclose($fh);
    
    //see which landing page is next in line to be shown.
    if ($offerNumber >= count($offer)) {
        $offerNumber = 1;
    } else {
        $offerNumber = $offerNumber + 1;
    }
    
    //write to the txt file.
    $fh = fopen($myFile, 'w') or die("can't open file");
    $stringData = $offerNumber . "\n";
    fwrite($fh, $stringData);
    fclose($fh);
    
    //grab the subid that t202 adds
    $subid = $_GET['subid'];
    
    //redirect to the affilate url, + add the subid at the end
    header('location: ' .$offer[$offerNumber] . $subid); 
    
    ?> 
     
    • Thanks Thanks x 1
  8. stoaf88

    stoaf88 Regular Member

    Joined:
    Nov 1, 2008
    Messages:
    243
    Likes Received:
    35
    Yea I guess I should jave thought of this for myself

    Thanks gimmie4free
     
  9. stoaf88

    stoaf88 Regular Member

    Joined:
    Nov 1, 2008
    Messages:
    243
    Likes Received:
    35
    Thanks to u also photoads, but I dont think that code will do it maybe it will I dont know anything about writing code
     
  10. Wizzoid

    Wizzoid Registered Member

    Joined:
    Dec 16, 2008
    Messages:
    94
    Likes Received:
    22
    Thanks a lot. I was just looking for this to use it in combination with my flash stuffer.