Command: Account Information

This api command returns acount information.

Command:

API Command Name: account_info

Required Parameters:

user_name UserName of the account

Optional Parameters:

Account information will be returnred in a serialized array format using serialize function, Additionally these encoddings can also apply to serialized output:

gzcompress Data will be compressed by gzcompress function with default level.
base64_encode Data will be packed by base64_encode function.
chunk_split Data will be chunked by chunk_split function.

Above encodings can be passed to API in form of encoding_n parameters where n is a number between 1 and 5. For instance if you send encoding_1=gzcompress&encoding_2=base64_encode then these functions will be applied to user information array:

  1. serialize
  2. gzcompress
  3. base64_encode

And if you send encoding_1=base64_encode then you will receive data provided by these functions:

  1. serialize
  2. base64_encode

A your end, you may decode the information in reverse order.

Note on output:

In any form of encoding data will be wrapped by -----DATA-START----- and -----DATA-END----- tags. So to grap the correct data your script can do a preg_match like this:

if(preg_match('/-----DATA-START-----(.*)-----DATA-END-----/smiU',$returned_data,$matches))
{
	$real_data = $matches[1];
	// routine to decode the data, i.e:
	// $data = base64_decode(unserialize($real_data));
}

Sample request to send to Say5 api:

$request  = 'command=account_info&user_name=testuser&encoding_1=base64_encode';
 
 
Copyright 2007-2019 Say5 Inc.