Obtaining a txt file through the web
My problem in a nutshell, i need to fetch a .txt file off the internet, then display the contents.
My problems are, I dont know what i need to do to acess the internet and fetch a file, the amount of characters in the file can be figured out to an accurate degree.
My other problem lies in the URL of this txt file i would like to get.
here it is:
https://myaccount.optusnet.com.au/my...age.txt?login=[insert user name]&passwd=[insert password]
Any one australian would most likely know this, and what i need to do (i think) is place the variables into the appropiate places before executing the URL, i hope ive explained my problem in enough detail, below is my code so far, its not much but you guys always seem to ask for it before helping ;)
so even a link, what functions to use, anything in the right direction is great, thanks.
P.S. I appologise for the long post and would really appreciate anyone who can spare some time, This is baised on a windows system. Also the code doesnt seem to work as is, maybe something to do with scanf
char username, password;
printf("-\t\t\t\t-\n- Welcome to Optus Netstats.\t-\n- Please enter your"
"user name at -\n- the prompt with your password -\n- following.\t\t\t"
printf("User Name: \n\n", username);
/* scanf function? also needs input validation */
printf("Password: \n\n", password);
printf("text %s %s", &username, &password);
/* we will be fetching a .txt file from
[insert user name]&passwd=[insert password]
the variables from username and password will need to be places into the
appropiate places. Then displayed. The amount of characters can be roughly