May 4, 2004 #1 d00ape Programmer Joined Apr 2, 2003 Messages 171 Location SE I need an easy way to copy a file from my http://www-server to my CPU in my MFC-App For e.g. from: http://www.ceco.se/ExistingTxt.txtTo: C:\ExistingTxt.txt
I need an easy way to copy a file from my http://www-server to my CPU in my MFC-App For e.g. from: http://www.ceco.se/ExistingTxt.txtTo: C:\ExistingTxt.txt
May 4, 2004 #2 Cagliostro Programmer Joined Sep 13, 2000 Messages 4,226 Location GB try using function InternetReadFile Ion Filipski Upvote 0 Downvote
May 10, 2004 #3 gzJungle Programmer Joined Jan 10, 2001 Messages 22 Location CN if you want to do it more basicly in socket level: [1]connect to http://www.ceco.se : 80; [2]send http get request, such as: GET /ExistingTxt.txt HTTP/1.0\r\n Host: http://www.ceco.sePragma: no-cache\r\n Agent: simple\r\n \r\n [3]wait web server response, normal one likes: HTTP/1.0 200 OK\r\n Content-Length: 2048\r\n Date: ...\r\n \r\n ...........(content is here, length = 2048) [4]read the resp conent & write to local hard disk.. jungle Upvote 0 Downvote
if you want to do it more basicly in socket level: [1]connect to http://www.ceco.se : 80; [2]send http get request, such as: GET /ExistingTxt.txt HTTP/1.0\r\n Host: http://www.ceco.sePragma: no-cache\r\n Agent: simple\r\n \r\n [3]wait web server response, normal one likes: HTTP/1.0 200 OK\r\n Content-Length: 2048\r\n Date: ...\r\n \r\n ...........(content is here, length = 2048) [4]read the resp conent & write to local hard disk.. jungle
May 10, 2004 Thread starter #4 d00ape Programmer Joined Apr 2, 2003 Messages 171 Location SE OK! Thanks. I found the func: URLDownloadToFile(...) and it also works. APe Upvote 0 Downvote