FuadK

Retrieve Tag Value using PHP

Discussion created by FuadK on Mar 25, 2014
Latest reply on May 15, 2014 by ChrisHouse

ive read that we can retrieve tag snapshot value using php, using below code:

<?php
        $comObjPi = new COM('PISDK.PISDK');
        $server = $comObjPi->Servers->Item("your pi server ip or domain name");
        $server->Open();$point = $server->PIPoints("the pi tag");  // any tag.
        $point->Data->SnapShot()->Value."\n";
        $data1 = $point->Data->SnapShot()->Value."\n";
        $data1= number_format($data1, 0, '.', '');//fix the format
        echo ($data1);//display the data
                     
  ?>

is there a library that i can refer to, instead of just taking the snapshot, maybe taking the archive value?

 

a way that i can retrieve an archive value or maybe create a trend using php?

 

Outcomes