Error getting the basics to work

Snoopy

Verified User
Joined
Jul 21, 2008
Messages
9
Hi All

Im new to this and just started by using the Api 2.6.
Im trying just the basic examples that came with it like the show all users
but just get Array() displayed and cant find out why..

Do anybody know the possible reason because im sure im missing something simple.

Any assistance to get started is appreciated.
 
Hi All

Im new to this and just started by using the Api 2.6.
Im trying just the basic examples that came with it like the show all users
but just get Array() displayed and cant find out why..

Do anybody know the possible reason because im sure im missing something simple.

Any assistance to get started is appreciated.
That means the value was returned as an array. To see the structure and values of the array, use print_r() on the variable. That'll give you a better idea on how to go about using the information in the array.
 
That means the value was returned as an array. To see the structure and values of the array, use print_r() on the variable. That'll give you a better idea on how to go about using the information in the array.

im using this as a basic test and im asuming the last line is what your refering to.. if so it still just prints Array()


include 'httpsocket.php';

$sock = new HTTPSocket;

$sock->connect('http://122.200.136.9','2222');
$sock ->set_method('GET');
$sock->set_login('admin','xxxxx');

$sock->query('/CMD_API_SHOW_ALL_USERS');
$result = $sock->fetch_parsed_body();

print_r($result);
 
Back
Top