Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <?php
  2. if(!isset($_GET["i"]) || $_GET["i"]==0) {
  3. echo '<meta http-equiv="refresh" content="0;URL=\'?i=1\'" />';
  4. exit;
  5. }
  6. ?>
  7. <meta http-equiv="refresh" content="2;URL='?i=0'" />
  8.  
  9. <?php
  10. $time_start = microtime(true);
  11.  
  12. $link = mysql_connect('XX', 'XX', 'XX');
  13. mysql_select_db("XX") or die(mysql_error());
  14.  
  15. $query="SELECT id FROM users limit 0,1";
  16. $result=mysql_query($query);
  17. $num=mysql_numrows($result);
  18.  
  19. if (!$link) {
  20. die('Não foi possível conectar: ' . mysql_error());
  21. }
  22. $time=(microtime(true) - $time_start);
  23. $color="";
  24. if((int)$time>1) $color="red";
  25. echo '<h1 style="color: '.$color.';font-size:40pt;">' . round($time,6).'</h1>';
  26. mysql_close($link);
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement