Results 1 to 5 of 5

Thread: URLDownloadToFile

Hybrid View

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    63

    URLDownloadToFile

    I've been using the URLDownloadToFile API call and I've been experiencing some hit & miss results that I've tracked down to the following. All of these examples return 0 (meaning successful download).

    These two create the website.html file, as they should:
    URLDownloadToFile(0, "http://www.google.com", "c:\website.html", 0, 0)
    URLDownloadToFile(0, "http://www.microsoft.com", "c:\website.html", 0, 0)

    But these don't create any file:
    URLDownloadToFile(0, "http://www.msn.com", "c:\website.html", 0, 0)
    URLDownloadToFile(0, "http://www.toysrus.com", "c:\website.html", 0, 0)

    I've tried using the DeleteUrlCacheEntry function as well. Same result. The above are obviously just 4 examples. Some sites work, some don't. Why?

  2. #2
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: URLDownloadToFile

    Hmm, Interesting i;ve just developed a application at work to automate some tasks and have never experianced any problems.

    I assume the reason for the issues is because you are specifying a site rather than a file? so maybe find out what the index file is and then downloading accordingly.

    eg http://www.microsoft.com/index.htm (or whatever it is!)

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2006
    Posts
    63

    Re: URLDownloadToFile

    I tried, but not sure how to tell what the filename of the page is i'm looking for. Can you try to reduplicate this problem to make sure it's not just me?

  4. #4
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: URLDownloadToFile

    Give me 5 minutes I'll try it out.

  5. #5
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Re: URLDownloadToFile

    Ok i get the same thing as stated. It ahs to be to do with the actual site... let me see.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width