Advertisement
Guest User

ERRO SIMPLE HTML DOM

a guest
Aug 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. require 'simple_html_dom.php';
  2. $html = file_get_html($_POST['urlPerfil']);
  3. $results = $html->find('.sgw-user-profile');
  4.  
  5. foreach($results as $statusPlayers) {
  6. $nametag = $statusPlayers->find('#user_name_details div[2]', 0)->plaintext;
  7. $clantag = $statusPlayers->find('#user_name_details div[3] div a', 0)->plaintext;
  8. $urlClan = $statusPlayers->find('#user_name_details div[3] div a', 0)->attr['href'];
  9. $idgamelink = $statusPlayers->find('#facebooksharebutton', 0)->attr['data-usn'];
  10. $killPlayer = $statusPlayers->find('#geral div', 0)->attr['data-kills'];
  11. $headShot = $statusPlayers->find('#geral div', 0)->attr['data-headshots'];
  12. $deathPlayer = $statusPlayers->find('#geral div', 0)->attr['data-deaths'];
  13. $totalPartidas = $statusPlayers->find('#geral div', 0)->attr['data-games_played'];
  14. $weaponPlayer = $statusPlayers->find('#armoury div[3] div[1] div div[2]', 0)->plaintext;
  15. $nivelPlayer = $statusPlayers->find('#top_level_user_details div[2] div[1]', 0)->attr['data-rank_title'];
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement