-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.php
23 lines (21 loc) · 2.19 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
include_once './common.php';
$method = $_SERVER['REQUEST_METHOD'];
$request = explode('/', trim($_SERVER['REQUEST_URI'],'/'));
$input = json_decode(file_get_contents('php://input'), true);
WebService::processCommand($method, $request, $input);
//echo WebService::processCommand("post", array("api", "getcategories", 0, "more", 0), array("keywords"=>""));
//echo WebService::processCommand("post", array("api", "getauthors", "more", 184), array("keywords"=>""));
//echo WebService::processCommand("post", array("api", "getbooks", "more", 0), array("keywords"=>"", "of"=>"category", "id"=>2));
//echo WebService::processCommand("post", array("api", "getbooks", "more", 0), array("keywords"=>"", "of"=>"author", "id"=>218));
//echo WebService::processCommand("post", array("api", "getbooks", "more", 0), array("keywords"=>"", "of"=>"books", "ids"=>array(119, 137)));
//echo WebService::processCommand("post", array("api", "saveuserpreference"), array("useremail"=>"[email protected]", "userpreferencelist"=>array(array(119, 1), array(137, 1))));
//echo WebService::processCommand("post", array("api", "loaduserpreference"), array("useremail"=>"[email protected]"));
//echo WebService::processCommand("post", array("api", "getbooks", "more", 0), array("keywords"=>"", "of"=>"mybooks", "id"=>"[email protected]"));
//echo WebService::processCommand("post", array("api", "getbooksubjects", 119, 0, "more", 0), array("keywords"=>""));
//echo WebService::processCommand("post", array("api", "getbook", 119), array());
//echo WebService::processCommand("post", array("api", "getauthor", 218), array());
//echo WebService::processCommand("post", array("api", "getpage", 119, 1), array());
//$keyWords = "انما الاعمال بالنيات وانما لكل امرئ ما نوى فمن كانت هجرته الى الله ورسوله فهجرته الى الله ورسوله ومن كانت هجرته لدنيا يصيبها او امراة يتزوجها فهجرته الى ما هاجر اليه";
//echo WebService::processCommand("post", array("api", "search", 0, "more", 0), array("keywords"=>$keyWords, "option"=>"exact"));
//echo WebService::processCommand("post", array("api", "getsimilarwords"), array("word"=>"الني", "limit"=>10));