<?php include __DIR__ . '/../../../inc/all.php'; $in = extractVars(INPUT_POST); $results = getProjectData($in["ID"]);
<?php //Attempt at creating an API for webiste require_once 'load.php'; include './io.php'; $verb = $_SERVER['REQUEST_METHOD']; $path = explode('/', ltrim($_SERVER['PATH_INFO'], "/")); switch ($verb) { case 'POST': case 'PUT': $dataIN = extractVars(INPUT_POST); break; default: $dataIN = extractVars(INPUT_GET); } $request = explode('/', ltrim($_SERVER['PATH_INFO'], "/")); switch ($request[0]) { case "Games": //Get game //CASE GET - GAME //Load information into a results variable //Get game //CASE GET - GAME //Load information into a results variable case "Lobbies": //Get Lobby //CASE GET,POST,PUT - LOBBY //Load information into a results variable //Get Userlist //CASE - GET - USERLIST //Load information into a results variable
<?php /* Returns the current contents of the Linora database as a JSON object, representing the arry of results, sorted on first the category, then on the caption. */ include __DIR__ . '/../../../inc/all.php'; $in = extractVars(); $results = get_links($in); sendResults($results);