Read one .txt on webpage

Hello,

I have a question that can be very basic, but I only work with desktop software (Mac) and I don’t know anything about the web, here’s my question.

I have a software (Mac) that reads .txt text files in a specific folder inside the mac, but now I need you to read some .txt files also in a folder that I will put inside my website eg: (www.mysite. com / txtfiles / info.txt) and put the information from this .txt to a Textfild in my Software.

Any help is welcome, thank you in advance!

URLConnection

Also there is a sample project Examples/Communication/Internet/URLConnection/FileDownloader

BUT maybe I misunderstand you. You want to view text document from web on desktop application?
Or are you asking about a web application?

[quote=485170:@brian franco]Also there is a sample project Examples/Communication/Internet/URLConnection/FileDownloader

BUT maybe I misunderstand you. You want to view text document from web on desktop application?
Or are you asking about a web application?[/quote]

Hello Brian,
I want to read the .txt in a folder on my website and write it in a textfield on the desktop app!

[quote=485173:@Paulo Vargas]Hello Brian,
I want to read the .txt in a folder on my website and write it in a textfield on the desktop app![/quote]
OK, well have a look at the links I gave you and that should help move you in the right direction

[code]dim x as new httpsocket
dim thetext as string = “”
x.yield = true
thetext = x.get(“http://www.mysite.com/txtfiles/info.txt”,6)

textfield1.text = thetext[/code]

I thought since release 2019R1 we are encouraged to use URLConnection

[quote=485195:@Jeff Tullin][code]dim x as new httpsocket
dim thetext as string = “”
x.yield = true
thetext = x.get(“http://www.mysite.com/txtfiles/info.txt”,6)

textfield1.text = thetext[/code][/quote]

Hello Jeff.

This code is not reading the contents of the .txt, am I doing something wrong ?

I dont use it yet

Its code I use to do the same for a file from my website
Are you sure the file exists where you expect it to?
If the website is on a Linux box , are the filenames and paths in the right capitalisation?

Have you tried the URLConnection method?

Is the used URL been relocated ?