loading a file like wget...

How do I open and read a text file based on a url parameter?

myhost://mypage.html/readfile?name=foobar.txt (Read a file called foobar.txt on the server.)
myhost://mypage.html/readfile?name=http://anotherhost.com/files/foobar.txt (Read a file called foobar.txt from another hosts public files.)

I know I would catch this in my App Handle URL or Handle Special URL… but not sure how to then open the file and read it in as a text file into a string array.

An HTTPSocket can do what you are describing.

In the first case, for a file on your own server, check http://documentation.xojo.com/index.php/TextInputStream

Thank Michel… I know how to read a file on the server… just wasn’t sure about the syntax from the url.
I believe Paul has grasped the other issue of being able to read a web page from a remote web server.