![]() |
|
|
|
#1
|
|||
|
|||
|
Hi,
I use DELPHI 7 with this code for a long time with ICS7 without any problems... My code download a page using httpcli and save in my local disk. but now ,after a fews months, the main site was updated and uses gzip-deflate and I think that this is the problem, I don't know how to handle this, and my code stop working. please, need help urgent..... download ICS7 package: ICS7 package => http://www.overbyte.be/arch/OverbyteIcsV7.zip download my full code (with sources and compiled exe). http://www.fileden.com/files/2010/4/...using-ICS7.zip Last edited by BaraoZemo; 06-29-2011 at 11:47 PM. |
|
#2
|
|||
|
|||
|
I downloaded your code but didn't get anything other than a blank html document and no text in the Memo...
Now, what I have tried is using the Snapse library and it seems that the page wants to redirect. I also got the same results with Indy. Here is the code I used and the response back from the website... Code:
procedure TForm1.Button1Click(Sender: TObject);
var
HTTP: THTTPSend;
begin
HTTP := THTTPSend.Create;
try
HTTP.HTTPMethod('GET', Edit1.text);
Memo1.Lines.Assign(HTTP.Headers);
Memo2.Lines.LoadFromStream(HTTP.Document);
finally
HTTP.Free;
end;
end;
Code:
HTTP/1.1 302 Found Location: http://www.caixa.gov.br/ Set-Cookie: security=true; path=/ Connection: close Content-Length: 0 Content-Type: text/html; charset=UTF-8
__________________
"Where there's a will, there's always a way." -- The Hon Robert Nester Marley O.M. - aka Bob Marley! |
|
#3
|
|||
|
|||
|
with the indy 10 (tiburon) , if you enable "cookies" (attach the cookies component to the idhttp, you will see the download working fine.. )
but I don't like use idhttp, because It freezes the application while downloading... and I got some memory leaks with indy so I don't use it. Last edited by BaraoZemo; 06-30-2011 at 08:45 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|