Activity Stream
48,167 MEMBERS
6739 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1.     
    #1
    Member
    Website's:
    warezxtc.com

    Default [PHP] Visit Random Site

    Needed this script for one of my sites so I just coded it up in minute or two.

    PHP Code: 
    <?php
    $lesites 
    = array(
        
    'http://www.warezlobby.org/',
        
    'http://www.atomicwarez.com/',
        
    'http://www.warezsearch.org/'
    );

    $randsite $lesites[array_rand($lesites)];

    header('Location: '.$randsite);
    die(
    '<a href="'.$randsite.'">Click here if you have not been redirected</a>');
    ?>
    CyberJ37 Reviewed by CyberJ37 on . [PHP] Visit Random Site Needed this script for one of my sites so I just coded it up in minute or two. <?php $lesites = array( 'http://www.warezlobby.org/', 'http://www.atomicwarez.com/', 'http://www.warezsearch.org/' ); $randsite = $lesites; Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Developer
    Website's:
    X4B.org
    Nice, efficient and no room for improvements. You have come along way with your PHP, good job.

  4.     
    #3
    Member
    Website's:
    warezxtc.com
    Quote Originally Posted by SplitIce View Post
    Nice, efficient and no room for improvements. You have come along way with your PHP, good job.
    Thanks, I'm improving everyday!

    My coding used to be really shitty before (nexus)

  5.     
    #4
    Respected Developer
    Website's:
    X4B.org
    By the way just thought of something you should do incase the browser is old and shitty

    replace exit with die('<a href="'.$lesites[array_rand($lesites)].'">Click here if you are not redirected</a>');

    I wouldnt be me if I didnt offer a improvement now would I?

  6.     
    #5
    Member
    Website's:
    warezxtc.com
    Ah, never thought of that.

    Edited the first post.

    Also, had to use a variable to hold the random site.

  7.     
    #6
    Member
    yea nice simple code. NJ

  8.     
    #7
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    i had to inprove it just a lil

    PHP Code: 
    <?php
    $lesites 
    = array(
        
    'http://www.warezlobby.org/',
        
    'http://www.atomicwarez.com/',
        
    'http://www.warezsearch.org/'
    );

    $randsite $lesites[array_rand($lesites)];

    ((
    headers_sent() === false) ? header('Location: '.$randsite) : die('<a href="'.$randsite.'">Click here if you have not been redirected</a>'));
    ?>
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  9.     
    #8
    Banned
    Website's:
    FusionWarez.info SmokeHost.net Leechers.co
    man, u guyz know your PHP here good

  10.     
    #9
    Member
    Website's:
    warezxtc.com
    Damn, never knew about that headers_sent() function LW, nice one!

  11.     
    #10
    Respected Developer
    Website's:
    X4B.org
    PHP Code: 
     <?php
    $lesites 
    = array(
        
    'http://www.warezlobby.org/',
        
    'http://www.atomicwarez.com/',
        
    'http://www.warezsearch.org/'
    );

    $randsite $lesites[array_rand($lesites)];

    ((
    headers_sent() === false) {
    header('Location: '.$randsite);
    die(
    '<a href="'.$randsite.'">Click here if you have not been redirected</a>'));
    }else{
    die(
    '<a href="'.$randsite.'">Click here if you have not been redirected</a>'));
    }
    ?>

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. I am Not Able to Visit My Site
    By Shahrukh in forum General Discussion
    Replies: 0
    Last Post: 5th Dec 2011, 07:37 AM
  2. First site to visit after Formats..
    By Netguy in forum Useful Sites
    Replies: 26
    Last Post: 20th May 2011, 09:11 PM
  3. Visit
    By NayabDahir in forum Introductions
    Replies: 0
    Last Post: 17th May 2011, 03:51 PM
  4. Visit my site!
    By timboy18 in forum Community Cooperative
    Replies: 1
    Last Post: 22nd Jul 2009, 07:33 AM

Tags for this Thread

BE SOCIAL