Advertisement
Wariie

Untitled

Mar 12th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>CSGO</title>
  6. </head>
  7. <body>
  8.     <form method="post" action="csgo.php">
  9.         <input type="text" placeholder="id" name="id">
  10.         <input type="submit" value="Envoyer" name="send">
  11.     </form>
  12.     <?php
  13.         if (isset($_POST['send']))
  14.         {
  15.             if (isset($_POST['id']))
  16.             {
  17.                 $destUrl = 'http://steamcommunity.com/profiles/' . $_POST['id'] . '/inventory/json/730/2/';
  18.  
  19.                 $context = stream_context_create(array('http' => array('header'=>'Connection: close\r\n')));
  20.                 $data = file_get_contents($destUrl, false, $context);
  21.                 $data = json_decode($data, true);
  22.  
  23.                 foreach ($data['rgInventory'] as $item) {
  24.                     echo $item['id'];
  25.                 }
  26.             }
  27.             else
  28.             {
  29.                 echo 'Please enter your SteamID';
  30.             }
  31.         }
  32.        
  33.     ?>
  34. </body>
  35. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement