🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Downloading and Uploading a file from and to the internet.

Started by
5 comments, last by IronFist 22 years, 10 months ago
For my newest game that I am making, I want people to be able to upload their high scores onto the internet. There will be a file on http://www.geocities.com/irongames called highscores.txt or something like that. When the player clicks on the upload scores button, I want my game to download the highscores.txt file, then edit it accordingly. Then when it is done changing it, I want my game to upload it back onto the site again. I know that the password and the username for the geocities site will probably be needed to upload the file again (this will be coded into the game), but other than that, I don''t know where to start. I am not even sure if network programming is needed for this. If anyone has any ideas or solutions to do this, please help.
Play Sumasshu, which is a game I programmed. CLICK HERE
Advertisement
I suggest you use a free FTP library. I use one called FTPLib. You can then use the FTP protocol to connect to your server and upload the file.


LostLogic
www.lostlogic.com
Author, Multiplayer Game Programming

LostLogicwww.GamerOutfit.comXBox 360 Community Games Reviews and NewsExisled - 2D/3D Shooter for XBox 360

Ok, I got FTPlib and placed the files in the "VC98\Include" directory. (I am using Visual C++ 6.0) I put the #include ftplib.h at the top of my code, and that compiles fine. But when I put the FtpInit(); in my main() function, I get these errors:

Compiling...
spacewars.cpp
Linking...
spacewars.obj : error LNK2001: unresolved external symbol __imp__FtpInit
Release/spacewars.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

spacewars.exe - 2 error(s)

So it compiles fine, but when it is trying to link up with the additional files, it has a problem. The only thing I can think of that might be the problem is I didn't include any .lib files (because I couldn't find any). That might be the problem, but it might be something else too. Do you have any ideas of what the problem could be?

Edited by - IronFist on August 27, 2001 9:54:01 PM
Play Sumasshu, which is a game I programmed. CLICK HERE
Hi,

How about including the .cpp and .h files into your project?


Dennis
Make sure that you are including the lib file. Also, I dont think that uploading to your Geocities account isn''t a great idea. It''s about as secure as giving somebody the ability to FTP to any site and you just type in the password for them. If they wanted to, they could find out what that password is.
there''s also the situation of two or more people accessing the file at the same time - someone would lose their score.
Good point kupps. I will somehow have to make it not possible to upload your score if someone else is already using the file. But if it doesn't upload, the player can always upload their high scores again by pressing the button again. That might be a little annoying, but if worse comes to worse, that is what will have to happen.

Invader X, I was afraid of that. Maybe I could make a different website that is only for the scores. And I will have a way of knowing if the scores are real or if they are fake (I have already thought of a way to make sure the uploaded scores are the real thing )

I still haven't been able to get the thing working though. I think I will give it a rest for about a week and work on other parts of my game, and then I'll come back to it. Sometimes it's better to just leave the problem, clear your mind, then come back to it later.

Edited by - IronFist on August 29, 2001 1:19:39 AM
Play Sumasshu, which is a game I programmed. CLICK HERE

This topic is closed to new replies.

Advertisement