hlrcheck.com
 All Data Structures Namespaces Files Functions Variables
API Class Reference

Public Member Functions

 __construct ($endpoint, $key, $secret)
 
 bulk ($msisdns, $type, $cachepersonaldays, $cacheshareddays, $cachesharedsave=1, $process=true)
 
 csv_download ($id)
 
 process ($id)
 
 check ($msisdns, $type, $cachepersonaldays, $cacheshareddays, $cachesharedsave=1, $url='')
 
 status ($id)
 
 pause ($id)
 
 generate ($id)
 
 delete ($id)
 
 balance ()
 

Protected Member Functions

 _url ($uri, $data)
 
 _curl ($uri, $data)
 
 _call ($uri, $data='')
 
 _download ($uri, $data='')
 

Protected Attributes

 $_key
 
 $_secret
 
 $_endpoint
 

Constructor & Destructor Documentation

__construct (   $endpoint,
  $key,
  $secret 
)

Member Function Documentation

_call (   $uri,
  $data = '' 
)
protected
_curl (   $uri,
  $data 
)
protected
_download (   $uri,
  $data = '' 
)
protected
_url (   $uri,
  $data 
)
protected
balance ( )

Return the number of credits on the account

Returns
an array with keys fullcredits and basiccredits
bulk (   $msisdns,
  $type,
  $cachepersonaldays,
  $cacheshareddays,
  $cachesharedsave = 1,
  $process = true 
)

Runs a bulk query

Returns
an array with three keys, status, batch and warning, the status will either be OK or ERR, the batch will be the batch ID used in subsequent calls and warnings will be any warnings i.e. the account is low on credits
Parameters
array$msisdnsan array of msisdns to check
string$typeeither basic or full
int$cachepersonaldaysthe number of days to check the personal cache
int$cacheshareddaysthe number of days to check the shared cache
int$cachesharedsave1 if to save results to the shared cache, 0 to keep results private
bool$processif to process the batch immediately
check (   $msisdns,
  $type,
  $cachepersonaldays,
  $cacheshareddays,
  $cachesharedsave = 1,
  $url = '' 
)
csv_download (   $id)

Downloads the results of a batch in CSV format

Returns
a CSV string containing the batch results
Parameters
string$idthe batch ID to download
delete (   $id)

Deletes a batch

Returns
a string either OK or FAILED
Parameters
string$idthe batch ID to delete
generate (   $id)

Generates a csv for a 'holding' batch

Returns
a string either OK or FAILED
Parameters
string$idthe batch ID to generate
pause (   $id)

Pauses a currently running batch

Returns
a string either OK or FAILED
Parameters
string$idthe batch ID to download
process (   $id)

Processes a batch that is in status 'holding'

Returns
a string either OK or FAILED
Parameters
string$idthe batch ID to download
status (   $id)

Returns the status of a batch

Returns
an array with three keys, 'remaining' the number of msisdns to process, 'csv' either a timestamp or false if there is a csv file generated, 'status' the status of the batch
Parameters
string$idthe batch ID to download

Field Documentation

$_endpoint
protected
$_key
protected
$_secret
protected

The documentation for this class was generated from the following file: