🎉 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!

Question.

Started by
1 comment, last by Marrob 22 years, 9 months ago
I''m programming in C++, and am working on a application that allows people that are registered with our free chat room based program to view and edit their profile. The question is that I would like to know if it''s possible to have a file located on a web site (such as a text file) that will search for username and password, load the info, upload over their previous stats, and exit the file? If this is possible, can someone give me some coding on how to connect to the file and search it and overwrite thier part of the file? Thanks in advance! Marrob
Marrob Kre''SharRPG Programmer
Advertisement
Given that the system isn''t extremely secure...

If you''re running NT or Win2k as your server, you can store the data in .ini files and use GetPrivateProfileString() (look it up in MSDN) to get the individual values and SetPrivateProfileString() to set the individual values. I might have mixed up the function names (it might be Read... and Write..., not Get/Set).

That''s the easiest way I can think of. Of course, if you''re running another OS (such as Linux), well, it becomes a real programming project.
I''m not entirely sure what you''ve got right now, but generally the easiest form of web integration is to use a database like MySQL as backend. You could use PHP (which is pretty well integrated with MySQL) for the website, and the standard C interface in your custom code. There''s also a MySQL C++ library you could use, but I don''t see its advantages over the purely C one.

Something like this is rather easy to implement, and has also other advantages: the back-end is stable and fast, you could load-balance your system with one server for the database and one for the httpd, etc...

cu,
Prefect

One line of sourcecode says more than a thousand words.
Widelands - laid back, free software strategy

This topic is closed to new replies.

Advertisement