Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question :)
#1
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 Sad
I need it for include auto-update in my program.
Please help.
Reply
#2
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.
Reply
#3
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
Reply
#4
I have problem.
I dont know which file I should download Sad
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 ?
Reply
#5
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
Reply
#6
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
Reply
#7
Hmmm, very strange, on my XP comp (all M$ updates to current) that code runs fine.
his sig left intentionally blank
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)