Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Help with downloading a text file off a website [Solved]  (Read 2119 times)

0 Members and 2 Guests are viewing this topic.

Joshua Flynn

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Help with downloading a text file off a website [Solved]
« on: July 16, 2011, 06:48:29 pm »
Hello.

I am trying to use either the HTTP or FTP examples (but I don't really understand them), but a valid webpage is returning 1001 (Connection Failed).

The page I want to access is here:
http://www.swpc.noaa.gov/ftpdir/lists/ace//20110715_ace_mag_1m.txt

But it's being reported as a 1001. I know if I can access it successfully, all I would merely have to do is merely copy from .Body into a file, which is simple enough.

What modifications do I need to make (note, I tried modifying the website address but only got 1001) to the HTTP (or FTP?) example to get it to successfully obtain the text file?

Thank you.

Joshua Flynn

  • Full Member
  • ***
  • Posts: 133
    • View Profile
Help with downloading a text file off a website [Solved]
« Reply #1 on: July 16, 2011, 07:01:02 pm »
Sorry, I solved my own problem.

For future reference:

In SetHost - you want to set the main website host name.
In URI - you want to set the subdirectory.

So if you had www.testsite.com/testpage

You will want:
SetHost("www.testasite.com");
SetURI("/testpage");

Sorry for my ignorance!

 

anything