Permalink
Browse files

JSON response

  • Loading branch information...
1 parent c769d06 commit 625e96fcb939936d185c3bb19eb17768c1ad6c6d @bergie committed May 8, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 index.php
View
@@ -2,7 +2,11 @@
require 'vendor/midgard/midgardmvc-helper-urlize/interface.php';
if (isset($_GET['urlize'])) {
- die(midgardmvc_helper_urlize::string($_GET['urlize']));
+ $data = array();
+ $data['from'] = $_GET['urlize'];
+ $data['to'] = midgardmvc_helper_urlize::string($_GET['urlize']);
+ header('Content-type: application/json');
+ die(json_encode($data));
}
?>
<h1>Urlizer service</h1>

0 comments on commit 625e96f

Please sign in to comment.