Skip to content

Instantly share code, notes, and snippets.

@evangoer
Created November 23, 2011 16:21
Show Gist options
  • Save evangoer/1389107 to your computer and use it in GitHub Desktop.
Save evangoer/1389107 to your computer and use it in GitHub Desktop.
A dirt-simple, least-common-denominator web service used for the Y.io() examples in the YUI 3 Cookbook.
<?php
header('Content-type: application/json');
$response = array();
if (isset($_GET['library']) && $_GET['library'] === 'YUI') {
$response['advice'] = 'YES';
$response['reason'] = "YUI doesn't eat your soul from the inside.";
}
else {
$response['advice'] = 'NO';
$response['reason'] = "You're living a lie.";
}
echo json_encode($response);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment