diff options
Diffstat (limited to 'app.php')
-rw-r--r-- | app.php | 42 |
1 files changed, 42 insertions, 0 deletions
@@ -8,7 +8,49 @@ include "includes/datas.php"; // encode array $json to JSON string
//echo "working...";
+
+if ($_GET['act'] == "submit") {
+header('Content-Type: text/xml');
+echo '<!-- response -->
+<BrainMazeAPI version="0.1">
+ <APIResponse>
+ <SubmitScore result="SUCCESS">
+ <Rank>5</Rank>
+ <SubmittedScore>50</SubmittedScore>
+ <PreviousHighScore>49</PreviousHighScore>
+ </SubmitScore>
+ </APIResponse>
+</BrainMazeAPI>';
+
+}
+
+
+$xml = '<!-- request -->
+<BrainMazeAPI version="0.1">
+ <APIRequest>
+ <SubmitScore>
+ <MapID>5</MapID>
+ <Username>FiftyToo</Username>
+ <Score>50</Score>
+ </SubmitScore>
+ </APIRequest>
+</BrainMazeAPI>
+
+<!-- response -->
+<BrainMazeAPI version="0.1">
+ <APIResponse>
+ <SubmitScore result="SUCCESS">
+ <Rank>5</Rank>
+ <SubmittedScore>50</SubmittedScore>
+ <PreviousHighScore>49</PreviousHighScore>
+ </SubmitScore>
+ </APIResponse>
+</BrainMazeAPI>';
+
+
+
+
if ($_GET['act'] == "getmap") {
$maptype = $_GET['maptype'] + 0;
|