MySQL provides a very simple method to select rows in random order. It uses the ORDER BY RAND()statement. If you will be used theORDER BY RAND() statement, MySQL will create a temporary table with all results, then will be assigned a random index to each row and finally will return the random rows! This makes the […]
Month / September 2011

When you would like to show a page only for a specified user or you wish to create a maintenance page, you may use this simple script:
1 2 3 4 5 6 7 8 9 10 |
// List of allowed IP addresses $allowIP = array("87.6.45.33", "234.34.34.2"); // etc... // Access denied if( !in_array($_SERVER['REMOTE_ADDR'], $allowIP ) { // include maintenance mode die(); } // Access grant and display the rest of view |