Hello,
I was wondering if there was any way that I could read in a file that is stored online. For example, if the file name was golf.txt, and it is on www.example.com/golf.txt. Is there any way I could read that in, and if so, how??
Thanks!!!
Hello,
I was wondering if there was any way that I could read in a file that is stored online. For example, if the file name was golf.txt, and it is on www.example.com/golf.txt. Is there any way I could read that in, and if so, how??
Thanks!!!
If you are working in linux machine you can get the online file using the command wget.
It will store in a particular file in the current directory .From that you can read the contents .Code:wget www.example.com/golf.txt
Thanks for the help, but unfortunately I'm using Windows. Any other way??
There is a version of wget for Windows. If not you just have to open a connection to that and print out the contents.
Otherwise,you can use Get-Content command to get the file content from online.
Should be able to send an HTTP request to that URL and the contents will be returned to you. I try and stay away from C when doing any real web work, but I think you could use a socket and send a simple HTTP request and be good to go.
Could anyone give me an example?? I am pretty new to C and don't know how I would implement your solutions