[PHP] Setup donator
#6

Quote:
Originally Posted by iLinx
Посмотреть сообщение
You would need to retrieve the file via ftp or scp or some type of file transfer if its located remotely.
Then you would need to use fopen() to attempt to open it, if it fails then the file dosent exist, obviously
After that you would need to fread() through the file, possible parse it (you could use simple string functions or something more complicated like a regex if you like), and edit your desired values.
Once your done that, you need to fwrite() the new data back into that file, and upload it back if its stored remote.

Another tip of mine would be to use a MySQL database or some other kind of file storage system and create a hash/user table system to cross reference the user with a randomly generated hash or encrypted value, or even just a random value altogether, to increase security.
Or you could be incredibly stupid - or smart - and create an RCON command to check a user's donation status, and modify it. RCON is just as secure as FTP you know. And probably quicker, too.
Reply


Messages In This Thread
[PHP] Setup donator - by master2die - 28.07.2010, 01:18
Re: [PHP] Setup donator - by Burridge - 28.07.2010, 08:47
Re: [PHP] Setup donator - by Cameltoe - 28.07.2010, 14:05
Re: [PHP] Setup donator - by iLinx - 28.07.2010, 20:05
Re: [PHP] Setup donator - by master2die - 28.07.2010, 22:06
Re: [PHP] Setup donator - by Westie - 28.07.2010, 23:50
Re: [PHP] Setup donator - by iLinx - 29.07.2010, 00:47

Forum Jump:


Users browsing this thread: 1 Guest(s)