Jump to content
  • Advertisement
Sign in to follow this  
PPCThug

questions about internetreadfile function

This topic is 4868 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm making a program that gets the source code of a web page. I folowed a tutorial and made a program that does get the source from a website. I started off using http://www.google.com for testing, I have internetreadfile set to read 4k char's off the site into a 4096 char array. in practice it returns success, but according to the last variable, it only read 1275 bytes. when I save the source code of www.google.com it comes to 2.49k abouts. now I tried a different site and it managed to get 4k bytes off of that. so my questions are these 1: why does it appear as though internetreadfile failed to get all of the page source from google.com 2: is there a reason why internetreadfile should be used multiple times to download a large webpage in small chunks, or is using it once for say 300kB acceptable?

Share this post


Link to post
Share on other sites
Advertisement
it sounds like you've got the basic idea. You need to specify how muchdata you want to read and then spin in a loop continually reading data to taht buffer until it reads nothing.

Cheers
Chris

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!