Posts: 8
Threads: 3
Joined: Jun 2004
I have question.
I would like download file from serwer (
http://puma01.w.interia.pl/file.txt) with QBasic 4.5, but I dont know what to do it
I need it for include auto-update in my program.
Please help.
Posts: 3,279
Threads: 170
Joined: Nov 2003
QB 4.5 has no internet capabilities. You'd have to use somthing like dsock for that.
I'd knock on wood, but my desk is particle board.
Posts: 293
Threads: 31
Joined: Nov 2004
Download cURL from
http://curl.haxx.se/download.html,
The packages area contains executable binarys.
Place CURL.EXE in the same directory as QB.
Use the following code to download:
Code:
SHELL "CURL -# -o "+ filename$ + chr$(32)+ url$
Where filename$ is the variable containing the name the download should be saved as on your computer and url$ is the variable which states the file to be downloaded.
Warning: After about 6000 consecutive downloads I tend to get a stack overload error from QB. I don't know why.
Is it hackish? Yes. Does it work? Also yes. Hope that helps.
his sig left intentionally blank
Posts: 8
Threads: 3
Joined: Jun 2004
I have problem.
I dont know which file I should download
I downloaded:
"curl-7.12.3.zip", but zip file doesnt include "CURL.EXE" so I went to: "curl Download Wizard" and there I saw "curl executable" (I select DOS system - but again i doesnt saw "curl.exe").
Where I should search this file ?
Posts: 293
Threads: 31
Joined: Nov 2004
Actually you should download the Win32 (Generic) non SSL version of cURL. Sorry I wasn't more specific before! :oops:
Link:
http://curl.signal42.com/download/curl-7...32-ssl.zip
his sig left intentionally blank
Posts: 8
Threads: 3
Joined: Jun 2004
I downloaded it.
This is code of my program:
filename$ = "file.txt"
url$ = "http://puma01.w.interia.pl/file.txt"
SHELL "CURL -# -o " + filename$ + CHR$(32) + url$
Qbasic compile it correctly, but Windows return error (critical error with CURL.EXE) when program is running.
I have Windows XP with SP2
Posts: 293
Threads: 31
Joined: Nov 2004
Hmmm, very strange, on my XP comp (all M$ updates to current) that code runs fine.
his sig left intentionally blank