Want a Forward to random URL

Discussion in 'Programming' started by TheSyndicate, Feb 21, 2009.

  1. #1
    I have

    Many domains that i want to forward to 5 diffrent websites.

    A script or code that i can just easy upload as a index file and it will redirect to these random 5 websites.


    PHP 5 secure code

    If someone have a CGI or PHP code or script that can do this or maybe i can use httac Please post it thanks.
     
    TheSyndicate, Feb 21, 2009 IP
  2. dazst

    dazst Active Member

    Messages:
    115
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    78
    #2
    <?

    $domains[] = "www.domain1.com";
    $domains[] = "www.domain2.com";
    $domains[] = "www.domain3.com";
    $domains[] = "www.domain4.com";
    $domains[] = "www.domain5.com";

    $random_domain = $domains[array_rand($domains)];
    header("Location: http://$random_domain");

    /*

    Coding provided by whitecollar18 at gmail dot com
    Expert PHP/MySQL Programmer

    */
    ?>

    INSTRUCTIONS: Put the above code into index.php

    If you need programming/development, please contact me :)
     
    dazst, Feb 22, 2009 IP
    TheSyndicate likes this.
  3. TheSyndicate

    TheSyndicate Prominent Member

    Messages:
    5,410
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    365
    #3
    Oki thanks this code looks cool and simple. No way to hack it right?
     
    TheSyndicate, Feb 22, 2009 IP