== items.statistics ==
==== Description ====
Retrieve items statistics
==== Input Parameters ====
<table>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th></tr>
<tr><td>item_id</td><td>mixed (int|array)</td><td>no</td><td>Show results for specified item ID(s)</td></tr>
<tr><td>page</td><td>(int)</td><td>no</td><td>Show only results on specified page</td></tr>
<tr><td>limit</td><td>(int)</td><td>no</td><td>Restrict results per page</td></tr>
<tr><td>on_date</td><td>(string)</td><td>no</td><td>Show results occured on specified date</td></tr>
<tr><td>from_date</td><td>(string)</td><td>no</td><td>Show results from specified date</td></tr>
<tr><td>to_date</td><td>(string)</td><td>no</td><td>Show results until specidied date</td></tr>
<tr><td>from_id</td><td>(int) Show results with ID(s)</td><td>no</td><td>higher than specified</td></tr>
<tr><td>to_id</td><td>(int) Show results with ID(s)</td><td>no</td><td>lower than specified</td></tr>
<tr><td>nocache</td><td>(bool)</td><td>no</td><td>Choose whether results should be cached or not</td></tr>
<tr><td>tracking_tag</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side tracking tag(s)</td></tr>
<tr><td>tracking_order</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side order ID(s)</td></tr>
<tr><td>currency</td><td>mixed (string|array)</td><td>no</td><td>Show results with specified currency</td></tr>
<tr><td>tracking_user</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified client side user ID(s)</td></tr>
<tr><td>order_id</td><td>mixed (int|array)</td><td>no</td><td>Show results with specified order ID(s)</td></tr>
<tr><td>country</td><td>mixed (string|array)</td><td>no</td><td>Show results having specified countries</td></tr>
<tr><td>ip</td><td>mixed (string|array)</td><td>no</td><td>Show only results having specified IP address(es)</td></tr>
<tr><td>host</td><td>mixed (string|array)</td><td>no</td><td>Show only results having specified host name(s)</td></tr>
<tr><td>pp_type</td><td>mixed (string|array)</td><td>no</td><td>Show results having specified processor type(s)</td></tr>
</table>
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th></tr>
<tr><td>result</td><td>array</td><td>Result array with data</td></tr>
</table>
==== Usage Example ====
```
<?php
require_once "curl_http_client/curl_http_client.php";
$curl = new \Dinke\Curl_HTTP_HttpClient();;
//setup payment url and timeout
$payment_url = 'https://dev-payment.datingvip.com/api.json';
$timeout = 30;
//generate post data
$post_data = array
(
'$curl->setCredentials('some-token' =>, 'some-token',
'password' => '130d04b80a4196857e47b254ebfbb53f',');
$post_data = array(
'comman'cmd' => 'items.statistics',
'data' => array()
);
$response = $curl->send_post_dPostData($payment_url, $post_data, null, $timeout);
if($response === false)
{
//handle errors
}
//decode json to get array
$response = json_decode($response, true);
var_dump($response);
```
Excepted output after running this script should be:
```
array (size=91)
'result' =>
array (size=8)
'code' => int 700
'status' => string 'Action completed succesfully' (length=28)
'command' => string 'items.statistics' (length=16)
'result' =>
array (size=15)
14 = 1882 =>
array (size=1)
'USD' =>
array (size=7)
'7.95-29.95' =>
array (size=9)
'spp' => string '7.95' (length=4)
'rpp' => string '29.95' (length=5)
'site_id' => string '1882' (length=4)
'signup_count' => int 25
'signup_amount' => float 198.75
'signup_unique' => int 25
'rebill_count' => int 200
'rebill_amount' => int 5990
'rebill_unique' => int 14
'29.95-29.95' =>
array (size=9)
'spp' => string '29.95' (length=5)
'rpp' => string '29.95' (length=5)
'site_id' => string '1882' (length=4)
'signup_count' => int 3
'signup_amount' => float 89.85
'signup_unique' => int 3
'rebill_count' => int 10
'rebill_amount' => float 299.5
'rebill_unique' => int 2
'23.97-23.97' =>
array (size=9)
'spp' => string '23.97' (length=5)
'rpp' => string '23.97' (length=5)
'site_id' => string '1882' (length=4)
'signup_count' => int 2
'signup_amount' => float 47.94
'signup_unique' => int 2
'rebill_count' => int 1
'rebill_amount' => float 23.97
'rebill_unique' => int 1
'10.00-10.00' =>
array (size=9)
'spp' => string '10.00' (length=5)
'rpp' => string '10.00' (length=5)
'site_id' => string '1882' (length=4)
'signup_count' => int 2
'signup_amount' => int 20
'signup_unique' => int 2
'rebill_count' => int 18
'rebill_amount' => int 180
'rebill_unique' => int 2
'39.99-39.99' =>
array (size=9)
'spp' => string '39.99' (length=5)
'rpp' => string '39.99' (length=5)
'site_id' => string '1882' (length=4)
'signup_count' => int 2
'signup_amount' => float 79.98
'signup_unique' => int 2
'rebill_count' => int 2
'rebill_amount' => float 79.98
'rebill_unique' => int 2
'1.00-27.69' =>
array (size=6)
'spp' => string '1.00' (length=4)
'rpp' => string '27.69' (length=5)
'site_id' => string '1882' (length=4)
'signup_count' => int 1
'signup_amount' => int 1
'signup_unique' => int 1
'39.95-0.00' =>
array (size=6)
'spp' => string '39.95' (length=5)
'rpp' => string '0.00' (length=4)
'site_id' => string '1882' (length=4)
'signup_count' => int 1
'signup_amount' => float 39.95
'signup_unique' => int 1
'EUR' =522 =>
array (size=1)
'0.00-24.99' ='USD' =>
array (size=6)
'spp' => string '0.00' (length=4)7.95-29.95' =>
array (size=9)
'spp' => string '7.95' (length=4)
'rpp' => string '29.95' (length=5)
'site_id' => string '522' (length=3)
'signup_count' => int 13
'signup_amount' => float 103.35
'signup_unique' => int 13
'rebill_count' => int 363
'rebill_amount' => float 10871.85
'rebill_unique' => int 10
'29.95-29.95' =>
array (size=9)
'spp' => string '29.95' (length=5)
'rpp' => string '29.95' (length=5)
'site_id' => string '522' (length=3)
'signup_count' => int 5
'signup_amount' => float 149.75
'signup_unique' => int 5
'rebill_count' => int 54
'rebill_amount' => float 1617.3
'rebill_unique' => int 2
'19.95-19.94' =>
array (size=9)
'spp' => string '19.95' (length=5)
'rpp' => string '19.94' (length=5)
'site_id' => string '522' (length=3)
'signup_count' => int 1
'signup_amount' => float 19.95
'signup_unique' => int 1
'rebill_count' => int 4
'rebill_amount' => float 79.76
'rebill_unique' => int 1
'24.99-24.99' =>
array (size=9)
'spp' => string '24.99' (length=5)
'rpp' => string '24.99' (length=5)
'site_id' => string '522' (length=3)
'signup_count' => int 1
'signup_amount' => float 24.99
'signup_unique' => int 1
'rebill_count' => int 77
'rebill_amount' => float 1924.23
'rebill_unique' => int 1
'site_id' => string '14' (length=2)1.00-14.47' =>
array (size=9)
'spp' => string '1.00' (length=4)
'rpp' => string '14.47' (length=5)
'site_id' => string '522' (length=3)
'signup_count' => int 3
'signup_amount' => int 3
'signup_unique' => int 2
'rebill_count' => int 161
'rebill_amount' => float 2329.67
'rebill_unique' => int 2
'39.95-0.00' =>
array (size=6)
'spp' => string '39.95' (length=5)
'rpp' => string '0.00' (length=4)
'site_id' => string '522' (length=3)
'signup_count' => int 1
'signup_amount' => float 39.95
'signup_unique' => int 1
22 =>
array (size=1)
'USD' =>
array (size=4)
'signup_amount' => float 24.9929.95-29.95' =>
array (size=9)
'spp' => string '29.95' (length=5)
'rpp' => string '29.95' (length=5)
'site_id' => string '22' (length=2)
'signup_count' => int 2
'signup_amount' => float 59.9
'signup_unique' => int 2
'rebill_count' => int 102
'rebill_amount' => float 3054.9
'rebill_unique' => int 2
'7.95-29.95' =>
array (size=9)
'spp' => string '7.95' (length=4)
'rpp' => string '29.95' (length=5)
'site_id' => string '22' (length=2)
'signup_count' => int 6
'signup_amount' => float 47.7
'signup_unique' => int 5
'rebill_count' => int 96
'rebill_amount' => float 2875.2
'rebill_unique' => int 3
'5.00-24.87' =>
array (size=9)
'spp' => string '5.00' (length=4)
'rpp' => string '24.87' (length=5)
'site_id' => string '22' (length=2)
'signup_count' => int 3
'signup_amount' => int 15
'signup_unique' => int 2
'rebill_count' => int 12
'rebill_amount' => float 298.44
'rebill_unique' => int 2
'39.99-39.99' =>
array (size=9)
'spp' => string '39.99' (length=5)
'rpp' => string '39.99' (length=5)
'site_id' => string '22' (length=2)
'signup_count' => int 1
'signup_amount' => float 39.99
'signup_unique' => int 1
'request' 'rebill_count' => int 1
'rebill_amount' => float 39.99
'rebill_unique' => int 1
512 =>
array (size=31)
'token 'USD' => string 'some-token' (length=10
array (size=12)
'password' => string '130d04b80a4196857e47b254ebfbb53f' (length=32) '7.95-29.95' =>
array (size=9)
'spp' => string '7.95' (length=4)
'rpp' => string '29.95' (length=5)
'site_id' => string '512' (length=3)
'signup_count' => int 8
'signup_amount' => float 63.6
'signup_unique' => int 8
'rebill_count' => int 1
'rebill_amount' => float 29.95
'rebill_unique' => int 1
'5.00-24.87' =>
array (size=9)
'spp' => string '5.00' (length=4)
'rpp' => string '24.87' (length=5)
'site_id' => string '512' (length=3)
'signup_count' => int 3
'signup_amount' => int 15
'signup_unique' => int 3
'rebill_count' => int 3
'rebill_amount' => float 74.61
'rebill_unique' => int 1
'29.95-29.95' =>
array (size=6)
'spp' => string '29.95' (length=5)
'rpp' => string '29.95' (length=5)
'site_id' => string '512' (length=3)
'signup_count' => int 4
'signup_amount' => float 119.8
'signup_unique' => int 4
'9.95-9.95' =>
array (size=9)
'spp' => string '9.95' (length=4)
'rpp' => string '9.95' (length=4)
'site_id' => string '512' (length=3)
'signup_count' => int 4
'signup_amount' => float 39.8
'signup_unique' => int 1
'rebill_count' => int 12
'rebill_amount' => float 119.4
'rebill_unique' => int 1
'7.95-9.95' =>
array (size=9)
'spp' => string '7.95' (length=4)
'rpp' => string '9.95' (length=4)
'site_id' => string '512' (length=3)
'signup_count' => int 1
'signup_amount' => float 7.95
'signup_unique' => int 1
'rebill_count' => int 4
'rebill_amount' => float 119.8
'rebill_unique' => int 1
'39.99-39.99' =>
array (size=9)
'spp' => string '39.99' (length=5)
'rpp' => string '39.99' (length=5)
'site_id' => string '512' (length=3)
'signup_count' => int 6
'signup_amount' => float 239.94
'signup_unique' => int 6
'rebill_count' => int 2
'rebill_amount' => float 79.98
'rebill_unique' => int 2
'23.97-23.97' =>
array (size=9)
'spp' => string '23.97' (length=5)
'rpp' => string '23.97' (length=5)
'site_id' => string '512' (length=3)
'signup_count' => int 2
'signup_amount' => float 47.94
'signup_unique' => int 2
'rebill_count' => int 1
'rebill_amount' => float 23.97
'rebill_unique' => int 1
'3.00-24.87' =>
array (size=9)
'spp' => string '3.00' (length=4)
'rpp' => string '24.87' (length=5)
'site_id' => string '512' (length=3)
'signup_count' => int 2
'signup_amount' => int 6
'signup_unique' => int 2
'rebill_count' => int 3
'rebill_amount' => float 74.61
'rebill_unique' => int 1
'1.00-19.47' =>
array (size=9)
'spp' => string '1.00' (length=4)
'rpp' => string '19.47' (length=5)
'site_id' => string '512' (length=3)
'signup_count' => int 2
'signup_amount' => int 2
'signup_unique' => int 2
'rebill_count' => int 6
'rebill_amount' => float 116.82
'rebill_unique' => int 2
'19.95-19.94' =>
array (size=9)
'spp' => string '19.95' (length=5)
'rpp' => string '19.94' (length=5)
'site_id' => string '512' (length=3)
'signup_count' => int 1
'signup_amount' => float 19.95
'signup_unique' => int 1
'rebill_count' => int 2
'rebill_amount' => float 39.88
'rebill_unique' => int 1
'39.95-0.00' =>
array (size=6)
'spp' => string '39.95' (length=5)
'rpp' => string '0.00' (length=4)
'site_id' => string '512' (length=3)
'signup_count' => int 5
'signup_amount' => float 199.75
'signup_unique' => int 5
'29.95-9.95' =>
array (size=6)
'spp' => string '29.95' (length=5)
'rpp' => string '9.95' (length=4)
'site_id' => string '512' (length=3)
'signup_count' => int 1
'signup_amount' => float 29.95
'signup_unique' => int 1
542 =>
array (size=1)
'USD' =>
array (size=1)
'2.99-2.99' =>
array (size=6)
'spp' => string '2.99' (length=4)
'rpp' => string '2.99' (length=4)
'site_id' => string '542' (length=3)
'signup_count' => int 33
'signup_amount' => float 98.67
'signup_unique' => int 33
'command'request' => string 'items.statistics' (length=16
array (size=3)
'ts 'cmd' => int 1399658213string 'items.statistics' (length=16)
'origin_ip 'token' => boolean falsestring 'some-token' (length=26)
'debug 'pass' => nullstring 'some-pass' (length=32)
'ts' => int 1429557764
'origin_ip' => string '93.87.220.184' (length=13)
'errors' => null
```