SMCELECTRICALIT

PHP to updatevalue / updatevalues from URL

Discussion created by SMCELECTRICALIT on Jul 24, 2012
Latest reply on Jul 27, 2012 by hanyong

Found this code (below) to connect to PI using PHP and it works fine. I would like to now UPDATEVALUES for a tag My goal is to pull values from the URL such as http://SERVER1/PIinsert.php&MYTAG1=1234&MYTAG2=5678 PIPoint.Data.UpdateValues(PItagname,MYTAG1) PIPoint.Data.UpdateValues(PItagname,MYTAG2) I can do this with PHP/MYSQL with no problem, having trouble figuring out how to get the data into PI. Anyone doing anything like this? should I forget Appache / PHP and just use IIS / HTML instead? any help would be appreciated. Borrowed Code:

 

Servers->Item("smce-osi-lab"); $myServer->Open(); echo "
"; echo "PI server time is {$myServer->ServerTime}"; echo "
"; ?>

Outcomes