echo " - volume = " . $e->content->params->volume . " - hits = " . $e->content->params->hits . " - last_request = " . $e->content->params->last_modified;
 }
 echo "\n\nGet top 50 hosts for download and flash traffic for the current month:";
 $list = $rams->getHostList("order=desc;type=http,rtmp");
 foreach ($list->feed->entry as $e) {
     echo "\nTraffic for type = " . $e->content->params->type . " and host = " . $e->content->params->host;
     echo " - volume = " . $e->content->params->volume . " - hits = " . $e->content->params->hits . " - last_request = " . $e->content->params->last_modified;
 }
 echo "\n\nGet concurrent traffic on 14th of April 2012 between 20:00 and 23:30 CET, 100 entries at a time:";
 $list = $rams->getConcurrentV1List("order=desc;from=2012-04-14-20-00-00;until=2012-04-14-23-30-00;paginate_by=100");
 while ($list) {
     foreach ($list->feed->entry as $e) {
         echo "\nTraffic for type = " . $e->content->params->type . " and datetime = " . $e->content->params->datetime;
         echo " - number of concurrent viewers = " . $e->content->params->hits;
     }
     $list = $rams->getNextList($list);
 }
 echo "\n\nGet storage list for the current year:";
 $list = $rams->getStorageList("year=curr;month=all");
 foreach ($list->feed->entry as $e) {
     echo "\nStorage for year = " . $e->content->params->year . " and month = " . $e->content->params->month;
     echo " - volume = " . $e->content->params->volume . " - last updated = " . $e->content->params->updated;
 }
 echo "\n\nGet active filter list:";
 $list = $rams->getFilterList("active=1");
 foreach ($list->feed->entry as $e) {
     echo "\nFilter with name = " . $e->content->params->name . ", active = " . $e->content->params->active;
     echo " - filter string = '" . $e->content->params->filter . "', operator = '" . $e->content->params->operator . "', threshold = " . $e->content->params->threshold . " - last_threshold_warning = " . $e->content->params->last_threshold_warning;
 }
 echo "\n\nGet traffic types:";
 $list = $rams->getTrafficTypeList();
Beispiel #2
0
     echo " - volume = " . $e->content->params->volume . " - hits = " . $e->content->params->hits . " - last_request = " . $e->content->params->last_request;
 }
 echo "\n\nGet traffic list for the sub-directories of the root directory:";
 $traffic = $rams->getTrafficList("/", "type=http,rtmp;kind=dir");
 foreach ($traffic->feed->entry as $e) {
     echo "\nTraffic for type = " . $e->content->params->type . ", kind = " . $e->content->params->kind . " and path = " . $e->content->params->path;
     echo " - volume = " . $e->content->params->volume . " - hits = " . $e->content->params->hits . " - last_request = " . $e->content->params->last_request;
 }
 echo "\n\nGet traffic list for the files inside the root directory, from 2012-01-01 until 2012-09-30 (200 entries at a time):";
 $traffic = $rams->getTrafficList("/", "type=http,rtmp;kind=file;from=2012-01-01;until=2012-09-30;paginate_by=200");
 while ($traffic) {
     foreach ($traffic->feed->entry as $e) {
         echo "\nTraffic for type = " . $e->content->params->type . ", kind = " . $e->content->params->kind . " and path = " . $e->content->params->path;
         echo " - volume = " . $e->content->params->volume . " - hits = " . $e->content->params->hits . " - last_request = " . $e->content->params->last_request;
     }
     $traffic = $rams->getNextList($traffic);
 }
 echo "\n\nGet traffic list for the files inside the root directory, for the current month:";
 $traffic = $rams->getTrafficList("/", "type=http,rtmp;kind=file;year=curr;month=curr");
 foreach ($traffic->feed->entry as $e) {
     echo "\nTraffic for type = " . $e->content->params->type . ", kind = " . $e->content->params->kind . " and path = " . $e->content->params->path;
     echo " - volume = " . $e->content->params->volume . " - hits = " . $e->content->params->hits . " - last_request = " . $e->content->params->last_request;
     # NOTE: the following properties require statistics layers to be enabled for your user account (see https://racp.rcms.rambla.be/?q=content/setting-statistics-filters)
     echo "Last Request: " . $e->content->params->last_request . "\n";
     echo "Seconds Average: " . $e->content->params->sec_avg . "\n";
     echo "Seconds Total: " . $e->content->params->sec_total . "\n";
     echo "Pct 0_10: " . $e->content->params->pct_0_10 . "\n";
     echo "Pct 10_20: " . $e->content->params->pct_10_20 . "\n";
     echo "Pct 20_30: " . $e->content->params->pct_20_30 . "\n";
     echo "Pct 30_40: " . $e->content->params->pct_30_40 . "\n";
     echo "Pct 40_50: " . $e->content->params->pct_40_50 . "\n";