service.php is the file waiting for HTTP-Requests. It interprets the given parameter, loads the co
ist die auf HTTP-Requests wartende Datei. Sie interpretiert die angegeben Parameter, lädt eine corresponding PHP-Class and executes the desired method. Afterwards it returns the methods result (i.e. the return value) as HTTP-Response. This answer can be eighter JSON-Encoded or PHP-serialized. other formats may be added / implemented easily, JSON is default.
All path informations are meant as relative to service.php or relative to a php_include_path
See also: Example content of services.php
The file service.php interprets GET and/or POST parameters. Following parameters will be interpreted:
js oder php, default is jsExample (both are identical, but the serialized (second) version is type safe)
.../service.php?service=timer_zeit&method=getTime¶meter[0]=H:i:s
.../service.php?service=timer_zeit&method=getTime¶meter=a:1:{i:0;s:5:"H:i:s"}
To get all methods a service provides the getMethods method can be called. For this method no service name is needed, it is a method provided by the api_provider itself. as parameter give the name of the service whose methods you like to get.
.../service.php?method=getMethods¶meter[0]=timer_zeit
.../service.php?method=getMethods¶meter=a:1:{i:0;s:10:"timer_zeit"}
The API-Providers itself can be called by just leaving away the parameter service. The API-Provider has two Methods, getCharset() and getMethods(serviceName)
services.inc.php by setting the variable $CHAR_SET. This needs to be set since I don't know how to figure out what char set the server expects dynamically. .../service.php?method=getCharset