Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

Http indy http get image ?

I need example of code which will download the image using IdHTTP1.Get and show it in program or save it to file.

Example where "get-image" is a script that will generate a image.

IdHTTP1.Get('http://localhost/get-image?code=123456');

Don't tell me to use UrlDownloadToFile or somthing else becuase i need to send some cookies to script to get this working.


Thank you !



0
65zgtre45rr
Asked:
65zgtre45rr
1 Solution
 
2266180Commented:
something like this? :

var f:TFileStream;
begin
  f:=TFileStream.Create('c:\test.gif',fmcreate);
  IdHTTP1.Get('http://www.experts-exchange.com/images/expertAwards2006Button.gif',f);
  f.free;
end;

:)
0
 
65zgtre45rrAuthor Commented:
Yes thank you :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now