6 Replies Latest reply on Nov 4, 2010 1:59 PM by akcsie

    need help on PHP integration

    akcsie

      Hi everyone,

       

       

       

      I'm a newbie here, this is my first post on virtual campus.

       

      I attended some webinars for pi system in the past few months.

       

      I was looking for a way to visualize data from pi with pure javascript and without any activex that will only run on IE,

       

      and also I want to use php instead of asp, I wonder if anyone can give me some guidance to start up.

       

      The speaker told me I can find many resources here, so here I am :) .

       

       

       

      I wish i can pull realtime data  from pi to php server, but jdbc is for java and odbc is not a good choice for phper.

       

      what else is available for php?

       

      TIA

       

       

       

      Justin

        • Re: need help on PHP integration
          Asle Frantzen

          Hi there Justin

           

          I think you should look into the PI Webservices product. You'll find it on the download page, I recommend you download it and give it a try!

           

           

           

          Edit: -Of course you could try the PI OLEDB Provider as well.

           

          -And here is a thread with some relevant info about HTML(5) and data access.

          • Re: need help on PHP integration
            smohr

            PI Web Services may be an option for you.  If your platform can make SOAP calls in a standards based way you will be okay.  We support both SOAP 1.1 and 1.2.  For security, the WS-Security stack is supported, but may need some configuration depending on your needs.  The out of the box installation is geared toward SOAP 1.2 with Windows security, but we provide sample configuration files for other scenarios.

              • Re: need help on PHP integration

                Am I missing a trick or couldn't you do something like the following:

                
                

                <?php
                $comObjPi = new COM('PISDK.PISDK');
                $server = $comObjPi->Servers->Item("YourPIServer");
                $server->Open();
                $point = $server->PIPoints("SINUSOID");
                echo "\n".$point->Data->SnapShot()->Value."\n";
                echo "\n".$point->Data->SnapShot()->TimeStamp."\n";
                ?>

                 

                • Re: need help on PHP integration
                  cescamilla

                  Stephen Mohr

                  If your platform can make SOAP calls in a standards based way you will be okay

                   

                  For information on how to use Web Services in php refer to the PHP manual available here

                    • Re: need help on PHP integration
                      MichaelvdV@Atos

                      The most important question would be:

                       

                      Do you want to access the PI data on the server side (PHP) or on the client side (JS)?

                       

                      If you want to use it on the server side, why not use PISDK (like Rhys mentioned). If you need it on the JS side, your best option would be PI WebServices. I don't think PI Webservices can be configured to use JSON, so you best bet would be to parse the XML in JS.

                       

                      If you want to use PI Webservices in PHP(5), your best bet is the SoapClient, Example here

                       

                      Here is some link I found about using WCF in JavaScript.

                  • Re: need help on PHP integration
                    akcsie

                    I get it, I'll look into COM or SOAP first.

                     

                    Thanks all for the useful information.

                     

                     

                     

                    Justin