Sign in to follow this  
Followers 0
cypher175

Read a .TXT File Hosted Online..?

9 posts in this topic

Are there any functions to read a .txt file thats hosted online without having to 1st download it..??

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Are there any functions to read a .txt file thats hosted online without having to 1st download it..??

:P No. You can't read a file without reading it.

If you are referring to not storing it on the hard disk, then yes.

Edited by Manadar

Share this post


Link to post
Share on other sites

uh which is it yes or no your response is confusing..??

I want to read the hosted .txt file without having to download it to disk..??

Share this post


Link to post
Share on other sites

Yes, you can. But it's not worth doing it, looking at the time it takes to develop such code.

Use InetGet to a temporary file and directory.

Share this post


Link to post
Share on other sites

Yes, you can. But it's not worth doing it, looking at the time it takes to develop such code.

Use InetGet to a temporary file and directory.

Or _INetGetSource () from the INet UDF...

Share this post


Link to post
Share on other sites

Is there anyway to do a _FileReadToArray with _INetGetSource without having to download the .txt file to disk..??

I have a hosted .txt file that has a website URL on each line that needs to get read into an Array so that i can use each URL on the .txt in a For Statement..??

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Is there anyway to do a _FileReadToArray with _INetGetSource without having to download the .txt file to disk..??

I have a hosted .txt file that has a website URL on each line that needs to get read into an Array so that i can use each URL on the .txt in a For Statement..??

you should be able to use _INetGetSource to get the file to memory then use string split with a line end character

edit: read help file notes about using @CRLF... you should only use @CR OR @LF

Edited by JohnMC

Share this post


Link to post
Share on other sites

Could you not use the _IE functions and read the body data?

ya, but my guess is by saying hes getting a .txt file, its only raw data, not html

#include <INet.au3>
$source=_INetGetSource ("http://www.myurl.com/file.txt")
$source_array=StringSplit ($source,@CR)

should be whats needed here

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0