forked from Kwozzie/australian-government-abn-lookup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.php
More file actions
28 lines (22 loc) · 684 Bytes
/
example.php
File metadata and controls
28 lines (22 loc) · 684 Bytes
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
<?php
// include our class, unless you are using an autoloader?
include "abnlookup.class.php";
$abn_search_string = "11111111111"; // you can assign your post/get var or abn string here
try{
$abnlookup = new abnlookup($abn_guid);
try{
$result = $abnlookup->searchByAbn($abn_search_string);
// display all results
echo "<pre>";
print_r($result);
echo "</pre>";
// also display by variables using object notation.
echo "<pre>";
$result->ABRPayloadSearchResults->response;
echo "</pre>";
} catch (Exception $e){
throw $e;
}
} catch(Exception $e){
echo $e->getMessage();
}