-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_df_doc.php
49 lines (46 loc) · 1.58 KB
/
test_df_doc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<?php
chdir(__DIR__);
ini_set('default_charset', 'UTF-8');
ini_set('display_errors', '1');
require_once 'vendor/autoload.php';
# set the url of the server
$url = 'http://10.1.88.8/HIS/index.php/DFRpcS';
//$url = 'http://61cd1fe0.ngrok.io/HIS/index.php/DFRpcS';
# create our client object, passing it the server url
$Client = new JsonRpc\Client($url);
# set up our rpc call with a method and params
$success = false;
/**
* รายการเอกสารค่าธรรมเนียมแพทย์
*/
$success = $Client->call('getDfDoc', []);
?>
<html>
<head>
<meta charset="UTF-8">
<title>เอกสารค่าธรรมเนียมแพทย์ TCS(JsonRPC)</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<div class="page-header">
<h1>เอกสารค่าธรรมเนียมแพทย์ TCS (JsonRPC)</h1>
</div>
<?php
echo '<b>Json RPC:</b> ', $url;
echo '<br /><br />';
echo '<b>result:</b> ', print_r($Client->result, 1);
echo '<br /><br />';
echo '<b>error:</b> ', $Client->error;
echo '<br /><br />';
echo '<b>output:</b> ', $Client->output;
?>
</div>
</body>
</html>