LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Labview to POST on a www server and save reply to file

We are trying, from a relatively large VI, to use the POST protocol to fill in the data at
http://mach.usno.navy.mil/cgi-bin/aa_micaform2?calc=9&ZZZ=END
and save the ASCII server reply to file. We need to do this every so often, changing the input parameters. If only the GET protocol was used by this server this would be straightforward... we have just purchased the Labview Internet toolkit to help with this, but don't find an evident way.
Can it be done?
Many thanks in advance for your help,
0 Kudos
Message 1 of 3
(2,802 Views)
try to use Microsoft Internet Transfer Control from Visual Basic. Set it on HTTP protocol and search for POST documentation in MSDN. As long as this is an activex control, you will be able to use it in LabView. Probably it's better to do it in VB and after that to transform the programm in VI.

good luck,

Lab Viewer
0 Kudos
Message 2 of 3
(2,802 Views)
Judging by the HTML source of the URL you gave, the authors are trying relatively hard to discourage the kind of thing you're trying to do. Maybe they feel that the API will change over time, or maybe they have legal reasons for it, who knows.

Anyway, perhaps the best approach (if you haven't already tried) would be to contact the site administrators and find out more about their policy for making the service available to other networked applications. Maybe they have a separate IP-based API that can be used, or maybe they would be willing to reconfigure their server to accept the GET request method and make your life easier.

Of course, it is possible to write a TCP/IP-based routine that will fake an HTTP POST to the server and get your results, but I haven't run across
one for LabVIEW.

Regards,
John Lum
National Instruments
0 Kudos
Message 3 of 3
(2,802 Views)