Can I get a http page?
Ive tested with Chck Http:
http://www.armisoftware.com/portit/p...%2010,1,0,2476
And I retreive a number but a text
Thanks
--
*Alberto Michelis*
ARMi software solutions www.armisoftware.com <http://www.armisoftware.com>
Can I get a http page?
Ive tested with Chck Http:
http://www.armisoftware.com/portit/p...%2010,1,0,2476
And I retreive a number but a text
Thanks
--
*Alberto Michelis*
ARMi software solutions www.armisoftware.com <http://www.armisoftware.com>
Alberto,
as far as I can see, this is not really a "downloadable" page or file.
http://www.armisoftware.com/portit/p...%2010,1,0,2476
The .php seems to "do" something and then generates or redirects to a file
(portitwintest.htm)? So this can't work.
Perhaps what you are looking for is a POST HTTP command?
Friedrich
Similar to this (see attached screenshot). But your server returns "NS no
existe" so I think the parameters in my test POST for your PHP are not
correct.
Friedrich
Hi Friedrich,
Basically using the functions in WININET and without the error checking you...
!*** get handle to Internet ***
handleOpen = InternetOpen(address(cstrUserAgent), INTERNET_OPEN_TYPE_DIRECT, 0,0,0)
!*** get handle to File on Internet ***
handleFile = InternetOpenUrl(handleOpen, address(cstrURL), address(cstrNull), -1, INTERNET_FLAG_RELOAD, 0)
!*** pause for half a second ***
!*** without pause only part of the response seems to be gathered ***
sleep(500)
!*** read bytes into buffer ***
result = InternetReadFile(handleFile, address(cstrBuffer), 32000, address(bytesRead))
!*** clean up - closing all handles in reverse order ***
result = InternetCloseHandle(handleFile)
result = InternetCloseHandle(handleOpen)
Graham
Hi Graham,
SetupBuilder makes use of the core WINSOCK component (to lower the
"false-positive" rate to an absolute minimum). The installer does not use
WININET. But of course, Alberto can write his own small (WinINet) DLL and
call it from within SetupBuilder, absolutely no problem.
IMO, the preferred method to handle this task (send a request to the server,
let the server validate the serial number, etc. and send back a status code)
is the HTTP POST method. That's what most SetupBuilder users are doing.
The method can be used for serial number validation, maintenance code
validation, online maintenance extension, email message sending, etc.
Friedrich
....sorry Friedrich my response seems to not be attached to the correct
position in the thread - but it's there if you check.
MesNews attaches posts at the correct position but adds attachments as
'part1' 'part2' etc
Opera Mail handles attachments just fine, but screws up when it comes
ot positioning the responses :-(
Graham
Hi Friedrich,
OK well can SetupBuilder use GET rather than POST?
If I load the Web page and check using Fiddler it's doing a GET and the
attached project uses the new ClaRunExt HTTP functions to GET the response.
Either as a file, or an XML string.
!*** next line should be all on one line ***
requestEndpoint =
'http://www.armisoftware.com/portit/portitwintest.php?echo=0&ns=14624-886-6738604-61711&ip=&data=1&vw=%2010,1,0,2476'
httpVerbMethod = HttpVerb:GET
requestParameters = 'format=xml'
postData = ''
responseOut = ''
retVal =
webReq.HttpWebRequest(requestEndpoint,httpVerbMeth od,postData,requestParameters,responseOut)
So if SetupBuilder can GET it should be OK yes?
Maybe I'm wrong but the address seems to be about grabbing stock market
quotes, seems a strange thing to want to do with SetupBuilder?
Graham
Hi Graham,
> OK well can SetupBuilder use GET rather than POST?
The "Download File (HTTP)..." script function in SetupBuilder uses the HTTP
GET command to retrieve a text or binary file, the "Post to HTTP Server..."
script function sends a HTTP POST request to the server (and can retrieve
the server response).
So both GET and POST are supported in SB.
Friedrich
This works fine :-)
Friedrich
Here is the working demo:
http://www.lindersoft.com/projects/Alberto_PostHTTP.zip
Please note the double %%
Friedrich
There are currently 1 users browsing this thread. (0 members and 1 guests)