Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File Transfers to a Web Site
Message
 
To
11/05/2004 15:22:55
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00902945
Message ID:
00903468
Views:
30
Hi Mike,

To transfer something to a web site certain steps should be followed

- establish connection with the host

- open HTTP request, usually of type POST

- set optional request headers
the headers are used to pass to the web server credentials or settings etc., something not very large

- send HTTP request; at this step you may attach bulk data like .dbf

- get initial response information (QueryInfo) and analyze response headers
there might be a lot of useful info in the response headers

- get response body if any

- close the request

There are several ways of implementing such functionality:
(1) Using WinInet set of API functions
HttpOpenRequest
HttpQueryInfo
HttpSendRequest
InternetCloseHandle
InternetConnect
InternetOpen
InternetQueryDataAvailable
InternetReadFile
...

(2) Using WinHTTP set of API functions:
WinHttpAddRequestHeaders
WinHttpCloseHandle
WinHttpConnect
WinHttpCrackUrl
WinHttpOpen
WinHttpOpenRequest
WinHttpQueryDataAvailable
WinHttpQueryHeaders
WinHttpReadData
WinHttpReceiveResponse
WinHttpSendRequest
WinHttpSetCredentials
...

(3) Using ActiveX, like WestWind one that Denis already mentioned or another one from the Microsoft
oHttp = CreateObject('MSXML2.ServerXMLHTTP')
...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform