PHP Classes

File: readme.txt

Recommend this page to a friend!
  Classes of Bijaya Kumar Behera   jApi RPC   readme.txt   Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: example file
Class: jApi RPC
Handle client and server API calls
Author: By
Last change: added comment
Date: 10 years ago
Size: 980 bytes
 

Contents

Class file image Download
How to setup a jApi severver 1. open the jApi_config.php 2. create a new auth token id ,ie in example "jApi-12-4858" 3. $jApi_rules['jApi-12-4858'], $jApi_rules['jApi-12-4859'] .... 4. assign auth api user IP in 'auth_ip' from where api session request will sent to jAPi server 5. assign auth verify user url 6. create api method create a folder i,e jApi_server/jApi_accounts/jApi-12-4858/classes then create a file jApi_default_class.php code : <?php class default_jApi_class extends jApi_class { static function function1 ($userid, $sess_data) { } } ?> How to setup a jApi cleint 1. open the jApi_config.php 2. // assign ur jApi JSON Api server define('jApi_auth_token', 'jApi-12-4858'); define('jApi_uri', 'http://localhost/jApi_server/pull.php'); 3. on client html javascript jApi.doApiCall('function1'); or jApi.doApiCall('default.function1'); jApi.doApiCall('<class>.<method>');