Page 1 of 1

Download Jpg file from HTTP (or binary)

Posted: Sat Nov 14, 2015 3:09 pm
by Sheeva700
Hi,

I'm trying to download a single jpg file from an http location with this code.

SendData(2,"GET http://IP:PORT/icon.jpg".." HTTP/1.1\r\n\r\n")
icon$ = ReceiveData(2,#RECEIVEALL)
debugprint(icon$)

is working fine but i receive also the http header then the jpg in data section (i presume)

How can i isolate "binary" datas only and by the way save file "icon.jpg" on my HD.

Thanks.

Re: Download Jpg file from HTTP (or binary)

Posted: Sat Nov 14, 2015 4:15 pm
by Sheeva700
DownloadFile() id the solution. :D