Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Making DBP download data from a URL and use it?

Author
Message
Sid Sinister
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 7th Nov 2008 04:26
Maybe this has a simple fix, but I have never thought about doing something like this so I wouldn't know. But is it possible to download a .txt file from a URL by using DBP commands? If not, could I do it in DarkGDK?

"If I have seen a little further it is by standing on the shoulders of Giants" - Isaac Newton
-Computer Animation Major @Baker.edu-
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 7th Nov 2008 04:31
yeah. search for download url function in the forums. there are also lots of plugins for that 2.
u are able 2 download whatever u want, not just txt file.

Get DBP stuff here! - (plugins/models/scripts and more!)
Sid Sinister
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 7th Nov 2008 05:18 Edited at: 7th Nov 2008 06:19
Funny, you made that plugin! Lol.

I found one thread and it led me on a rabbit trail. I stumbled upon this code and am now trying to get it to work. It runs, but I just don't get the file download...



Edit: I saw Cattle Rustler mentioned XUpdate, but his site seems to be down for the moment.

"If I have seen a little further it is by standing on the shoulders of Giants" - Isaac Newton
-Computer Animation Major @Baker.edu-
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 7th Nov 2008 13:49
DLFile("http://dataphone.games.tucows.com/files/","FishTycoonSetup.exe")

"http://dataphone.games.tucows.com/files/" - i dont think such file is exist..

Get DBP stuff here! - (plugins/models/scripts and more!)
Sid Sinister
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 8th Nov 2008 09:00
Serg - I've inserted my own link and it still doesn't work

Windows - The reason I want to do this is because the browser war game I play, Tribal Wars, updates their world data and releases it to the public. Their are several websites and apps that take this world data and provide analysis on it.

The reason I need this URL thing to work is so I can get a poke at that data. I'm looking into XNA to do this for me, because I want some graphical things to come along with it, but OOP is killing me after using procedural for so long.

"If I have seen a little further it is by standing on the shoulders of Giants" - Isaac Newton
-Computer Animation Major @Baker.edu-
Sergey K
20
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 8th Nov 2008 14:54
why wont u try my Free DBP Plugin with lots of usefull functions inside..
http://gamegeeks.jarekull.se/html/gogaFree.htm
it got also a downloader function.

Get DBP stuff here! - (plugins/models/scripts and more!)
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 8th Nov 2008 22:01
Works for me. I did change the function so it doesn't stick the filename on the end of the url before trying to download it.



By way of demonstration, he emitted a batlike squeak that was indeed bothersome.
Sid Sinister
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 9th Nov 2008 03:50 Edited at: 9th Nov 2008 04:23
I tried your snippet the_winch, but all it runs, and then flashes a black screen and returns to the desktop. I don't know why it's not waiting for key or displaying the image. Odd... do you know what's going on?

EDIT: I'm on vista, but other DBP programs run just fine...

"If I have seen a little further it is by standing on the shoulders of Giants" - Isaac Newton
-Computer Animation Major @Baker.edu-
calcyman
16
Years of Service
User Offline
Joined: 31st Aug 2007
Location: The Uncertainty Principle
Posted: 9th Nov 2008 16:43
I believe this works:



The optomist's right, The pessimist's right.
Sid Sinister
18
Years of Service
User Offline
Joined: 10th Jul 2005
Location:
Posted: 11th Nov 2008 06:25
Why doesn't this work??



"If I have seen a little further it is by standing on the shoulders of Giants" - Isaac Newton
-Computer Animation Major @Baker.edu-

Login to post a reply

Server time is: 2024-05-03 21:50:02
Your offset time is: 2024-05-03 21:50:02