LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help submitting an HTML Post command

Hi Everyone,

I need a help submitting a POST command to an Apache Server. I unfortunately have almost no expierience with HTML. Can anyone give me a simple example to start with and what I might need to do?

Thank you very much in advance,
Oz


Message Edited by OzRuiz on 12-18-2007 09:18 AM

Message Edited by OzRuiz on 12-18-2007 09:21 AM
0 Kudos
Message 1 of 3
(3,464 Views)
I don't recall ever seeing an example that explicitly used POST for HTTP. I've seen examples to fetch documents that use the IE ActiveX control, as well as examples that use the (formerly known as) Internet Toolkit.

If you're on Windows you can also use the Microsoft Internet Transfer Control. It's an ActiveX control, and it has an Execute method that allows POST commands.
0 Kudos
Message 2 of 3
(3,426 Views)
This is actually very simple with native LabVIEW functions.

Use an TCP Open Connection to open a port to the server (I used
ws.cdyne.com, with port 80).

Send your request with TCP Write (I send the text listed below. This text is
copied directly from the ws.cdyne.com web page, where you can find examples
for POST, GET and others).

Read back the data with TCP Read.

Close the connection with TCP Close Connection.

Note that the data you send and receive doesn't need to be HTML. It could be
any text, but most likelly XML or HTML. In this case it's a soap message,
basically an XML format designed for communicating with servers. Some
servers send the data back in several parts, but I have not found any
describtion about this format.

Regards,

Wiebe.


+++++++++++++++++++++++++++++
POST /ip2geo/ip2geo.asmx HTTP/1.1
Host: ws.cdyne.com
Content-Type: text/xml; charset=utf-8
Content-Length: 391
SOAPAction: "http://ws.cdyne.com/ResolveIP"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ResolveIP xmlns="http://ws.cdyne.com/">
<IPaddress>62.250.4.144</IPaddress>
<LicenseKey>0</LicenseKey>
</ResolveIP>
</soap:Body>
</soap:Envelope>
++++++++++++++++++++++


0 Kudos
Message 3 of 3
(3,408 Views)