Code

Initial revision
[rrdtool-all.git] / contrib / php3 / examples / rrd_last.php
1 <?
3  dl("/tmp/php3_rrdtool.so");
5  ##
6  ## demonstration of the rrd_last() command
7  ##
9  $ret = rrd_last("/some/path/some-router-fe2.rrd");
11  if ( $ret != - 1 )
12  {
13      printf("Last update time:  %s\n", strftime("%m/%d/%Y %H:%M:%S");
14  }
15  else
16  {
17      $err_msg = rrd_error();
18      echo "Error occurred:  $err_msg\n";
19  }
22 ?>