Possible
#1

Hi there.

I am currently experimenting to the boundaries of SA:MP and have come across an issue I would like to see if I can achieve. Currently, I have a 'SQLite' database storing my ban information under my 'scriptfiles' folder in my server.

I wish to get this database to automatically upload to a location of my web hosting server. I asked my provider whom supplies me the game server AND the web server (at different locations, I should probably add) and the response I got was this:

Quote:

Hello,

You could write a script in conjunction with a cron job to automatically download the file to the web server via FTP (this can be achieved with PHP's FTP function library).

Regards

Would anyone be able to help me achieve this in this way or any other?
Just to clarify, I wish to be able to get my gameserver to be able to automatically upload the SQLite database holding the ban information to my web hosting server in a different location.

All the best,
- Daniel.
Reply
#2

A FTP plugin would be the best for that job, but i havent seen one yet.

The PHP way depends on what permissions you got on the server hoster side. If got a webserver there directly connected with your server's ftp directories, you would have to write a short php script that uploads the ban database to the other webspace via ftp. Then you could call that script using samps HTTP function whenever updating the ban list to keep the file on the website space up to date.
Reply
#3

Apparently I do have permissions in order to do that on my game server with regards to your second point.
However, I have no clue on earth how to even start writing something like that. Do you think you'd be able to help me?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)