|
-
Aug 18th, 2006, 01:00 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Get Text From File On Site
Hello, I would like to know how to connect to a site and read a data file and have a textbox have the same text as the file. The reason so I can learn an easy way to check for updates.
-
Aug 18th, 2006, 01:02 AM
#2
Re: Get Text From File On Site
Use the Internet Transfer Control (Inet):
VB Code:
Text1.Text = Inet1.OpenURL ("http://www.google.com")
edit: For a better view, use:
-
Aug 18th, 2006, 01:03 AM
#3
Lively Member
Re: Get Text From File On Site
i would download a spicified INI or TXT file and have the newest version stored in there, and compare it to the version stored in the your exe.
-
Aug 18th, 2006, 01:30 AM
#4
Thread Starter
Addicted Member
Re: Get Text From File On Site
Is there another way to do this besides the Internet Transfer Control?
Last edited by GedOfEarthsea; Aug 18th, 2006 at 01:39 AM.
-
Aug 18th, 2006, 10:51 AM
#5
Re: Get Text From File On Site
You could FTP the file. How you do it depends on how the site is set up and what permissions you have on the site.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Aug 18th, 2006, 01:17 PM
#6
Thread Starter
Addicted Member
Re: Get Text From File On Site
Nevermind I used something I found in the API-Guide. If you are interested it was this:
VB Code:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Private Sub Form_Load()
DownloadFile "http://www.allapi.net", "c:\allapi.htm"
End Sub
-
Aug 18th, 2006, 01:21 PM
#7
Re: [RESOLVED] Get Text From File On Site
I have just recently see somebody having problems with this API. Check... this thread.
-
Aug 18th, 2006, 01:43 PM
#8
Thread Starter
Addicted Member
Re: [RESOLVED] Get Text From File On Site
Thanks, I will look into it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|