Zerlegung der Url, Game-Bans Vac-Bans, Avatar in allen größen, Username (mehr folgt)
This commit is contained in:
parent
093e772663
commit
c29c72cce6
1 changed files with 44 additions and 14 deletions
|
@ -1,16 +1,46 @@
|
|||
|
||||
<h1>Test!</h1>
|
||||
|
||||
<?php
|
||||
$url=$_POST['txturl'];
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL,$url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
|
||||
$output = curl_exec($ch);
|
||||
echo $output;
|
||||
curl_close($ch);
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo function_exists('curl_version')?'Yes':'No';
|
||||
?>
|
||||
if (!empty($_GET['act'])) {
|
||||
|
||||
$getplayerbans = "http://api.steampowered.com/ISteamUser/GetPlayerBans/v1/?key=F8BD4313F99AB0E4EFF0CD95FC989734&steamids=";
|
||||
$getplayersummarie ="http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=F8BD4313F99AB0E4EFF0CD95FC989734&steamids=";
|
||||
|
||||
|
||||
$id = explode( "/", $_GET["url_input"]);
|
||||
|
||||
|
||||
$comburl_summarie = $getplayersummarie . end($id);
|
||||
$comburl_bans = $getplayerbans . end($id);
|
||||
|
||||
$summarie = file_get_contents($comburl_summarie);
|
||||
$temp_summarie = json_decode($summarie, true);
|
||||
|
||||
$vaced = file_get_contents($comburl_bans);
|
||||
$temp_bans = json_decode($vaced, true);
|
||||
|
||||
|
||||
|
||||
$gameban_output = $temp_bans["players"][0]["NumberOfGameBans"];
|
||||
$vacban_output = $temp_bans["players"][0]["NumberOfVACBans"];
|
||||
|
||||
$personname = $temp_summarie["response"]["players"][0]["personaname"];
|
||||
/* avatr, avatarmedium, avatarfull */
|
||||
$avatarurl = $temp_summarie["response"]["players"][0]["avatarmedium"];
|
||||
|
||||
|
||||
echo $personname . "hat "."Game-Bans: " .$gameban_output .":". "Vac-Bans: ". $vacban_output;
|
||||
|
||||
echo "<img src=$avatarurl>";
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<form action="curl_testfile.php" method="get">
|
||||
<input type="hidden" name="act" value="run">
|
||||
<input type="text" name="url_input"><br>
|
||||
<input type="submit" value="Check!">
|
||||
</form>
|
||||
|
||||
<?php
|
||||
?>
|
||||
|
|
Reference in a new issue