I really don't know if this is the right place to post this but I really need a solution.
How can i make a program access an online file.
Supposing I want to access http://www.example.com/sample.txt via my program, how exactly can it be accomplished?
I recommend with Linux. Pick a distro you think looks cool. People generally go with Debian, Ubuntu, or OpenSUSE first. They're easy to pick up and have a nice GUI for you. Though I will urge you to use the terminal like all the time. You'll learn a lot that way, and come to realize that it's actually much easier to work in a command line environment than it is dealing with a GUI.
As for running Linux, download the .iso file for the distro of your choice, then I'd go grap VMWare Player and run it in that. That way you don't have to worry about partitioning your harddrive or running it off a live CD and you'll still have Windows running right there. That's what I do on both my work computer and home computer.