Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(!isset($_GET["i"]) || $_GET["i"]==0) {
- echo '<meta http-equiv="refresh" content="0;URL=\'?i=1\'" />';
- exit;
- }
- ?>
- <meta http-equiv="refresh" content="2;URL='?i=0'" />
- <?php
- $time_start = microtime(true);
- $link = mysql_connect('XX', 'XX', 'XX');
- mysql_select_db("XX") or die(mysql_error());
- $query="SELECT id FROM users limit 0,1";
- $result=mysql_query($query);
- $num=mysql_numrows($result);
- if (!$link) {
- die('Não foi possível conectar: ' . mysql_error());
- }
- $time=(microtime(true) - $time_start);
- $color="";
- if((int)$time>1) $color="red";
- echo '<h1 style="color: '.$color.';font-size:40pt;">' . round($time,6).'</h1>';
- mysql_close($link);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement