summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Bratch <l_bratch@yahoo.co.uk>2014-07-25 11:03:39 +0100
committerLuke Bratch <l_bratch@yahoo.co.uk>2014-07-25 11:03:39 +0100
commit65af1e7eedacaa724c0f3f83ac69ca8bd2466442 (patch)
tree35bbbd53f01e66548f29dbd9b1f141925a358570
parentbbf9995ea023fe928fa9906edf50f6475f841b5a (diff)
Set the correct content type for JSON output
-rw-r--r--index.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.php b/index.php
index 1dcac7b..5ef509d 100644
--- a/index.php
+++ b/index.php
@@ -303,6 +303,8 @@ for ($i = 0; $i < count($listing); $i++) {
</body></html>
<?php
} else if ($_GET['format'] == "json") {
+ header("Content-type: application/json");
+
echo json_encode($listing);
} else if ($_GET['format'] == "raw") {
print_r($listing);