Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function tiketapi()
- {
- $client = new nusoap_client('http://10.35.65.11:8080/arsys/WSDL/public/55.25.70.1/BRI:INC:GetInfoFromIPAddress', 'wsdl');
- $header = "<AuthenticationInfo><userName>int_nominal</userName><password>123456</password></AuthenticationInfo>";
- $client->setHeaders($header);
- $err = $client->getError();
- if ($err) {
- echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
- }
- $result = $client->call("Get_ticket_info");
- if(!empty($result)) {
- $jsonOutput = json_encode([
- 'incident_number' => $result['IncidentNumber'],
- 'description' => $result['Description'],
- 'notes' => $result['Notes'],
- 'status' => $result['Status'],
- 'code' => 200
- ]);
- } else {
- $jsonOutput = json_encode([
- 'incident_number' => '-',
- 'description' => '-',
- 'notes' => '-',
- 'status' => '-',
- 'code' => 404
- ]);
- }
- echo $jsonOutput;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement