### Show Server File Content

To show the content of a file located at an internet server
The Download routine is used from the jHTTPUtils2 library.
Example content of a pagecounter text file
The pagecount is stored in the pagecounter.txt.
' Download the file from the internet using httpjob - requires library jHTTPUtils
`Sub DownloadFileFromInternet
' HTTP job for download
Dim job1 As HttpJob
' Give a unique jobname
Dim JobName As String = "pagecounter"
' The remote filename with url
Dim fileURL As String = "/pagecounter.txt"" target="_blank">http:///pagecounter.txt"
' Init the job with Jobname given
job1.Initialize(JobName, Me)
' Start downloading
job1.Download(fileURL)
' See below JobDone Event to action result
End Sub`
' Download file from server job done event. The file content will be logged.
`Sub JobDone (Job As HttpJob)
Log("Job result for JobName = " & Job.JobName & ", Success = " & Job.Success)
' Job went OK, log the content
If Job.Success = True Then
Log("Job Done. Pagecounter: " & Job.GetString)
Else
Log("Job Error: " & Job.ErrorMessage)
End If
Job.Release
End Sub`
Other usage
• Check the version of an app, to then update.
• Check logfile.

Changed: , Category: Internet, File: T6C203M1492.htm, ID: 1492