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

PHP Advice/Job Needed - Have $$$

Discussion in 'BlackHat Lounge' started by etype, Dec 28, 2009.

  1. etype

    etype Newbie

    Joined:
    Jan 27, 2009
    Messages:
    36
    Likes Received:
    34
    Location:
    Somewhere over the Rainbow
    Hi! I will try to explain this in the best way I know, so please bear with and have a little patience as I'm not experienced in programming nor knowleadgable in the programming jargon. So here goes.

    I would need advice regarding traffic. It is about splitting traffic or more precisely redirecting traffic. What I want to do is the following:

    I want to equally redirect/send traffic (5,000 visitors) from my main site to my gray hat sites. Which means first 1,000 visitors to my site/domain-1, second 1,000 visitors to site/domain-2, third set of 1,000 visitors to site/domain-3, and so on till all traffic has been distributed. (in case of more traffic coming from the source (main site/domain) the visitors are redirected to a 6th domain or the loop starts over again).

    Your advice is greatly apreciated. ;) I believe there is a script already made with excat or similar function, so if anyone knows the name or place where got I get script, please don't hesistate to inform me. :)

    I'm also willing to buy such script or hiire any decent programmer who understands the concept of what I need.

    Last but not least, Here's also an ilustration I made that will make my explanation easier to understand.
    Code:
    http://img138.imageshack.us/img138/7495/phpscriptscheme.jpg
    PS: The title numbers should be 1,2,3,4 but instead are 1,2,2,2; Don't let that little mistake disturb you.

    Looking forward to your reply :rolleyes:
     
  2. badman1

    badman1 Junior Member

    Joined:
    Dec 22, 2009
    Messages:
    125
    Likes Received:
    47
    Ok so im in the opposite end of the spectrum i could give you nice loop code however im not too good with redirecting of traffic i could give the basic loop code and then you could maybe find the code to actually redirect.. and insert it into the code..
     
    • Thanks Thanks x 1
  3. etype

    etype Newbie

    Joined:
    Jan 27, 2009
    Messages:
    36
    Likes Received:
    34
    Location:
    Somewhere over the Rainbow
    I think the loop code would be useful, because the basic thing I need is something that splits traffic equally. It is similar to having 1 Liter bottles, you pour wine into each one untill you have emptied the barrel. But please do tell me more of what you meant. And also thank you for replying ;)
     
  4. Fireice

    Fireice Newbie

    Joined:
    Dec 28, 2009
    Messages:
    14
    Likes Received:
    1
    I can do that for you. If you want to split traffic equally the simpler way would be to make a random link (20% of the time it would be link1, 20% link2, etc.). Also, do you want a link? Perhaps a HTTP 302 would be better?
     
    • Thanks Thanks x 1
  5. BozoClown

    BozoClown Junior Member

    Joined:
    Jan 4, 2009
    Messages:
    150
    Likes Received:
    106
    Why don't you do a random redirection. The result should even out, OR are you not the one for statistics?
     
    • Thanks Thanks x 1
  6. etype

    etype Newbie

    Joined:
    Jan 27, 2009
    Messages:
    36
    Likes Received:
    34
    Location:
    Somewhere over the Rainbow
    Not 100%, but a 99% nonetheless :D. Thanks a whole bunch you really nailed it for me. I find it funny howcome I haven't thought of it myself.
    Really apreciate it mate, honestly :rolleyes:.

    @Fireice: Thank you for your offer but I'm already fully set with RR thanks to Bozoclown ;), a big thanks to your contribution too. :)
     
  7. vysniukas

    vysniukas Newbie

    Joined:
    Nov 17, 2009
    Messages:
    23
    Likes Received:
    6
    here is simple file how it can be done: index.php
    PHP:
    <?php
       $i  
    rand (1,5);
    switch (
    $i) {
        case 
    1:
            
    header("location: http://www.domain1.com");
            break;
        case 
    2:

            
    header("location: http://www.domain2.com");
            break;
        case 
    3:

            
    header("location: http://www.domain3.com");
            break;

        case 
    4:

            
    header("location: http://www.domain4.com");
            break;

        case 
    5:

            
    header("location: http://www.domain5.com");
            break;
    }

    ?>


     
    • Thanks Thanks x 1