LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read web services output with PHP

Hello,

 

I have a successful web service running from the tutorial provided by labview. The data does display when accessing the local URL with no issues. My problem is when I try to read the data using php I get a blank page. I have tried XML and json output. The json output stalls the page from loading and eventually I get a error 500 in IE. Any help would be greatly appreciated.

0 Kudos
Message 1 of 4
(2,917 Views)
Well I think I figured it out. If I had paid a little more attention I would have noticed I needed to write a separate vi as the "web client" to communicate with the web service instead of actually browsing directly to the web service it's self. Any added help is greatly appreciated.
0 Kudos
Message 2 of 4
(2,889 Views)
Yeah I don't get it. It's to the point where I am pulling my hair out. I do not understand why I can not read my web services output with php. I have tried reading the URL with all the different methods php offers for reading files/URLs. I do not know what else to try. It seems like I am so close to getting this to work and I feel like I am missing something. The sad thing is, this post will be lost in the thousands of pages of other posts and will never be answered.
0 Kudos
Message 3 of 4
(2,875 Views)

Hello Kud,

 

Can you verify that you see data when using HTTP Get?  You can find this function from Data Communication >> Protocol >> HTTP Client.

For example:
  HTTPGet.png

 

If so, this really is a PHP issue rather than a National Instruments/LabVIEW.  Take a look at this for more help.

 

Thanks,

 

Lisa

Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,866 Views)