function http_request($dispatchPath) { $request = new \PHPMachine\Request(); $response = new \PHPMachine\Response(); $response = execute_request($request, $response, $dispatchPath); $response->serve(); }
function process_list($zip, $cat) { $results = array(); $response = array(); for ($i = 0; $i <= 90; $i += 10) { $body = execute_request('search', getSearchUrl($zip, $cat, $i)); $search = json_decode(filter_result($body)); $ids = $search->ids; $body = execute_request('doctors', getDoctorsList($ids)); if ($body) { $result = json_decode(filter_result($body)); $list = $result->doctor_locations; foreach ($list as $key => $value) { $results[] = $value; } } else { break; } } $response['doctor_locations'] = $results; return json_encode($response); }
Session::set('db', 'changed', true); Session::set('db', 'name', $_REQUEST["db"]); if (v($_GET["x"]) == 1) { echo '<div id="results">1</div>'; } else { header('Location: ' . EXTERNAL_PATH); } exit; } // after this, we need the user set options to be visible everywhere include_once BASE_PATH . "/lib/options.php"; if (v($_REQUEST["q"]) == "wrkfrm") { if (!$DB->connect(DB_HOST, DB_USER, DB_PASS, getDbName())) { die(showDBError()); } execute_request($DB); $DB->disconnect(); include_once BASE_PATH . "/lib/output.php"; Output::flush(); exit; } include BASE_PATH . "/lib/html.php"; include BASE_PATH . "/lib/interface.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset='utf-8';" /> <title>MyWebSQL</title> <link rel="stylesheet" type="text/css" href="cache.php?css=theme,default" /> <link rel="SHORTCUT ICON" href="favicon.ico" />
echo '<b>Valid generate key request:</b><br />'; execute_request($args); } // // Valid check request if ($request == 'check') { $args = array('wc-api' => 'software-api', 'request' => 'check', 'email' => $email, 'licence_key' => $licence_key, 'product_id' => $product_id); echo '<b>Valid check request:</b><br />'; execute_request($args); } // // Valid activation request if ($request == 'activation') { $args = array('request' => 'activation', 'email' => $email, 'licence_key' => $licence_key, 'product_id' => $product_id, 'secret_key' => $secret_key, 'instance' => $instance); echo '<b>Valid activation request:</b><br />'; execute_request($args); } // // Valid activation reset request if ($request == 'activation_reset') { $args = array('request' => 'activation_reset', 'email' => $email, 'product_id' => $product_id, 'licence_key' => $licence_key, 'secret_key' => $secret_key); echo '<b>Valid activation reset request:</b><br />'; execute_request($args); } // // Valid deactivation reset request if ($request == 'deactivation') { $args = array('request' => 'deactivation', 'email' => $email, 'licence_key' => $licence_key, 'product_id' => $product_id, 'instance' => $instance); echo '<b>Valid deactivation request:</b><br />'; execute_request($args); }