Advertisement
irokemr

Steam Usuario Conectado/Desconectado

Dec 29th, 2020
1,615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting(0);
  4.  
  5.  
  6.  
  7. $usuario = $_GET["usuario"];
  8.  
  9. $page= file_get_contents("https://steamcommunity.com/id/$usuario");
  10.  
  11. $steam = explode ('<div class="profile_in_game_header">', $page);
  12. $steam = explode ("</div>", $steam[1]);
  13.  
  14.  
  15.  
  16. $texto = $steam[0];
  17. $texto = preg_replace('(Currently)', '', $texto);
  18.  
  19.  
  20. $texto = preg_replace('(Online)', '<font color="green">Conectado</font>', $texto);
  21.  
  22. $texto = preg_replace('(Offline)', '<font color="red">Desconectado</font>', $texto);
  23. echo $texto;
  24.  
  25.  
  26.  
  27. ?>
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement