-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathindex.php
More file actions
41 lines (30 loc) · 932 Bytes
/
index.php
File metadata and controls
41 lines (30 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<body>
<?php
require_once("steam/SteamUser.php");
require_once("steam/SteamGame.php");
require_once("steam/SteamApps.php");
?>
<h1>Steam API Test </h1>
<?php
//Handler for building this API from Terminal CLI:
if(substr(php_sapi_name(), 0, 3) == "cli")
$userID = $argv[1]; //Pull ID from CLI args
else
$userID = $_GET["id"]; // Pull it from the apache / CGI / whatever
//Call the SteamUser constructor with either the 17-digit Steam Community ID
//or their custom URL (i.e. robinwalker)
// $user = new SteamUser($userID);
// $games = $user->getGamesList();
// print_r($games);
// SteamApps Example, is "Garry's Mod" up to date?:
$steamAppsObject = new SteamApps();
$data = $steamAppsObject->upToDateCheck(4000, 140415);
print_r($data);
// $game = new SteamGame(440); //New SteamGame with TF2's AppID set.
// $news = $game->getNewsItems();
// print_r($news);
?>
</body>
</html>