projects
/
pharext
/
replicator.pharext.org
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
| inline |
side by side
modularize
[pharext/replicator.pharext.org]
/
public
/
json.php
diff --git a/public/json.php
b/public/json.php
new file mode 100644
(file)
index 0000000..
84f9c96
--- /dev/null
+++ b/
public/json.php
@@ -0,0
+1,10
@@
+<?php
+const INCLUDED = __FILE__;
+
+require_once "index.php";
+
+$res->setContentType("application/json");
+$res->getBody()->append(
+ json_encode(empty($package) ? $packages : package_versions($package))
+);
+$res->send();