-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxml.php
More file actions
42 lines (39 loc) · 1.22 KB
/
xml.php
File metadata and controls
42 lines (39 loc) · 1.22 KB
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
<?php
header("Content-type: text/xml");
$steamid = "";
if (isset($_GET['Steamid'])) {
$steamid = mysql_real_escape_string($_GET["Steamid"]);
}
include("inc/dbconnect.php");
$sql = "SELECT * FROM `Player` WHERE `STEAMID` LIKE '$steamid'";
$ergebnis = mysql_query($sql);
while ($adr = mysql_fetch_array($ergebnis)) {
$NAME = $adr['NAME'];
$KILLS = $adr['KILLS'];
$DEATHS = $adr['DEATHS'];
$SUICIDES = $adr['SUICIDES'];
$POINTS = $adr['POINTS'];
}
if ($POINTS != "") {
######rank#####
$sql2 = "SELECT ID FROM `Player` WHERE `POINTS` >='$POINTS'";
$ergebnis2 = mysql_query($sql2);
$RANK = mysql_num_rows($ergebnis2);
echo mysql_error();
###############
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?> \r\n";
echo "<player> \r\n";
echo "<STEAMID>" . $steamid . "</STEAMID>";
echo "<NAME>" . $NAME . "</NAME>";
echo "<KILLS>" . $KILLS . "</KILLS>";
echo "<DEATHS>" . $DEATHS . "</DEATHS>";
echo "<SUICIDES>" . $SUICIDES . "</SUICIDES>";
echo "<POINTS>" . $POINTS . "</POINTS>";
echo "<RANK>" . $RANK . "</RANK>";
echo "</player> \r\n";
} else {
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?> \r\n";
echo "<player> \r\n";
echo "</player> \r\n";
}
?>