Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Copyright © 2019 by Ali Deym <ali.deym.gm@gmail.com>
- // Disallow direct api calls.
- defined("APICALL") || die("Invalid direct request.");
- global $db_connection;
- // Check for steamid parameter.
- if (!isset($_POST["steamid"])) {
- die (json_encode(array(
- "status" => "argumentfail",
- "response" => "Arguments invalid."
- )
- ));
- }
- $steamid = $_POST["steamid"];
- $contents = file_get_contents("https://steamcommunity.com/profiles/$steamid/?xml=1");
- $contents = str_replace("<br/>", ": ", $contents);
- echo json_encode(array(
- "status" => "success",
- "response" => $contents
- )
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement