Advertisement
irokemr

Steam pais php

Dec 29th, 2020
1,342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 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. $steamPais = explode ('gif">', $page);
  12. $steamPais = explode ('</div>', $steamPais[1]);
  13.  
  14.  
  15.  
  16.  
  17.  
  18. $texto = $steamPais[0];
  19. $texto = preg_replace('(Spain)', utf8_encode("España"), $texto);
  20.  
  21. $texto = preg_replace('(New York, New York, United States)', utf8_encode("Nueva York, Nueva York, Estados Unidos"), $texto);
  22.  
  23. $texto = preg_replace('(United States)', utf8_encode("Estados Unidos"), $texto);
  24.  
  25.  
  26.  
  27. echo $texto;
  28.  
  29.  
  30. ?>
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement