468,134 Members | 1,203 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,134 developers. It's quick & easy.

Opening a text file from the internet

16
I was wondering how I would be able to open and take input from a text file through the internet. I was hoping that I could simply replace the filepath on my computer with the direct file online, but that was not the case. I'm using this to take usernames and passwords from the file. This is the working code I have now putting the data into an array.

Thanks alot, Frog

Expand|Select|Wrap|Line Numbers
  1. nFileNum = FreeFile
  2.  
  3. Open "C:\Documents and Settings\Matt\My Documents\testing.txt" For Input As nFileNum
  4. lLineCount = 1
  5.  
  6. NumLine = 0
  7. LCount = 1
  8. UnPw = 0
  9.  
  10. Do While Not EOF(nFileNum)
  11.    Line Input #nFileNum, sText
  12.    LCount = LCount + 1
  13.    If LCount Mod 2 <> 0 Then UnPw = 2
  14.    If LCount Mod 2 = 0 Then
  15.    NumLine = NumLine + 1
  16.    UnPw = 1
  17.    End If
  18.   UInfo(NumLine, UnPw) = sText
  19. Loop
Jul 9 '07 #1
0 726

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Clinton Goff | last post: by
14 posts views Thread by D. Alvarado | last post: by
2 posts views Thread by Matt Hamilton | last post: by
9 posts views Thread by Erwin Moller | last post: by
27 posts views Thread by didacticone | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.