Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello!
Sorry for may bad English, I'm an Austrian. Ok here is my question:

I have a little program which opens a txt file from my local hard disk. Now I want to open a txt file from my web server and put it out in the console window. But how can I open the file ?

This doesn't work:
C++
ptr = fopen("\\http://king.ath.cx//server.txt" ,"r+");
if(ptr == NULL) {
 printf("\nfopen error\n");
 getchar();
}

Alex
Posted
Updated 22-May-10 4:26am
v4
Comments
Moak 22-May-10 10:07am    
Updated subject and tags, I think a 'HTTP client' is what you are looking for.

This is C, there's nothing built in to the core language that anticipates the web. I doubt there's even add ins, you'd need C++ for that.
 
Share this answer
 
ok thx
but I'm only able to write into C
lg
Alex
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900