ctdo/website/spaceapi.php

40 lines
1.1 KiB
PHP
Raw Normal View History

2014-04-29 10:38:52 +00:00
<?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json");
header("Cache-Control: no-cache");
2014-04-29 10:38:52 +00:00
$quelltext = file_get_contents("http://www.chaostreff-dortmund.de/raumstatus.php?txt");
$state = $quelltext == "online\n" ? "true" : "false";
2014-04-29 10:38:52 +00:00
?>
{
"api":"0.13",
2014-04-29 10:38:52 +00:00
"space":"Chaostreff-Dortmund",
2014-06-13 21:13:28 +00:00
"logo":"http://www.chaostreff-dortmund.de/logo/logo_ctdo.svg",
2014-04-29 10:38:52 +00:00
"icon":{
2014-06-13 21:13:28 +00:00
"open":"http://status.ctdo.de/img/green.png",
"closed":"http://status.ctdo.de/img/red.png"
},
"state": {
"open":<?php echo $state; ?>
2014-04-29 10:38:52 +00:00
},
"url":"https://www.chaostreff-dortmund.de/",
"address":"Braunschweigerstr. 22, 44145 Dortmund, Germany",
"contact":{
"irc":"irc://irc.hackint.org/#ctdo",
2014-04-29 10:38:52 +00:00
"twitter":"@ctdo",
"email":"presse@chaostreff-dortmund.de",
"ml":"discuss@lists.chaostreff-dortmund.de"
2014-04-29 10:38:52 +00:00
},
"issue_report_channels": ["ml"],
"location": {
"address":"Braunschweigerstr. 22, 44145 Dortmund, Germany",
"lat":51.527664,
"lon":7.465072
},
"lat": 51.527664,
"lon": 7.465072,
2014-04-29 10:56:30 +00:00
"open":<?php echo $state; ?>
2014-04-29 10:38:52 +00:00
}