-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgameUpToDate.Php
43 lines (43 loc) · 1.44 KB
/
gameUpToDate.Php
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
42
43
<?
If ( !Isset ( $_GET['appid'] ) || !Isset ( $_GET['version'] ) )
{
Echo "How to use this page: gameUpToDate.Php?appid=730&version=512.128.8192";
}
Else
{
$AppId = Mb_Strtolower ( Trim ( $_GET['appid'] ) );
$Version = Mb_Strtolower ( Trim ( $_GET['version'] ) );
If ( Mb_Strstr ( $AppId, "%" ) || Mb_Strstr ( $Version, "%" ) )
{
Echo "How to use this page: gameUpToDate.Php?appid=730&version=512.128.8192";
}
Else
{
$Error = False;
For ( $It = 0; $It < Mb_Strlen ( $Version ); $It++ )
{
If ( ( $Version[ $It ] != '.' ) && ( ( $Version[ $It ] < '0' ) || ( $Version[ $It ] > '9' ) ) )
{
$Error = True;
}
}
If ( $Error )
{
Echo "How to use this page: gameUpToDate.Php?appid=730&version=512.128.8192";
}
Else
{
$Buffer = Sprintf ( "http://api.steampowered.com/ISteamApps/UpToDateCheck/v0001/?appid=%d&version=%s", ( ( Int ) ( $AppId ) ), $Version );
$Contents = @File_Get_Contents ( $Buffer );
If ( $Contents )
{
Echo Mb_Strtolower ( Trim ( $Contents ) );
}
Else
{
Echo "Steam error.";
}
}
}
}
?>