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 / Read URL Info DIRECTLY Into A String?

Author
Message
LongFist
19
Years of Service
User Offline
Joined: 25th May 2004
Location: Winston-Salem, NC
Posted: 5th Jun 2007 19:47 Edited at: 5th Jun 2007 23:23
The situation: An Application needs to go on line, check a web site for some pertinent data, then drop off. Simple, yes? No. But the limitations are (probably) all mine.

Current Scenario:
The application Loads URLMON.DLL as DLL 1 (or whatever number is appropriate), then performs a URLDownLoadToFile, placing the data in a temp file, then drops connect. The Temp file is then loaded into a string, and processed for pertinent data.

Connect. Save URL data to file. Read file into memory. Process string for pertinent data.

Too many steps, I'm thinking. Not very efficient at all, considering the capabilities of the development engine and the native windows environment.

Question: Is there a way to perform the connect, URL data retrieval directly to the String? I seem to recall doing something like this in VB6 - a long time ago - but have forgotten the "hooks" I used, and there's no way to recover the original utility: the company it belong(ed)s to has been defunct for years.

Just curious, as a recent conversation with Jinzai made me realize that the kludge I use to acquire external IP addresses could very well be streamlined into something neat, quick, quiet, and clean. Alas, I'm not sure how this could be accomplished, or how.

Thank you in advance for your time and troubles!

LongFist
SuperProgrammer For Hire
spooky
21
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 6th Jun 2007 00:03
Yes you can read contents of URL straight into a memblock.

Read this post and also a couple of links it talks about;

http://forum.thegamecreators.com/?m=forum_view&t=77150&b=18

You can either download whole lot in one go, or do a progress bar type thingy and download in sections.

Boo!
LongFist
19
Years of Service
User Offline
Joined: 25th May 2004
Location: Winston-Salem, NC
Posted: 7th Jun 2007 19:43
Thank you Spooky - you've resolved a log-jam, and I can now complete my code for use over here. Of course, I'm sure you knew all of that - I was just trying to be considerate, and not hijack Jinzai's post.

I've credited you heavily, and when I put the code up, I think you'll like what has evolved. Thank you very VERY much - this wouldn't have happened without your timely assistance!!!

LongFist
SuperProgrammer For Hire

Login to post a reply

Server time is: 2024-05-18 09:41:38
Your offset time is: 2024-05-18 09:41:38