Automating UTStats import with mutator
Hi folks!
If you dont have access to cron jobs on your webserver and you're sick of manually updating your UTSTATS through the IMPORT menu option? Well, here'S a little server actor, that may help ;-) Your UTSTATS-installation *MUST* be configured for ftp-import. How it works: The URI when updating your UTStats through the IMPORT option is something like this: http://www.yourwebserver.com/utstats...p?key=password Since UT-server has the abillity to browse to websites, like in the News tab when searching for UT-servers, the mutator is simply querying the URI to the import.php-script of your UTStats installation and the import.php script starts uploading the stats from the UT-server to your UTStats-server. Thats all folks. Download here: UTStats-Trigger v1.0 Read the readme.txt !!! Though mutator is working fine on my server, the early development stage can still hold some surprises, of course. When you face problems using this mutator simply e-mail me. text The UTStats team or anybody else can use the code in your projects. No copyright, no licence, no GPL-bullshit. This is absolutly FREE software. Use at own will and risk. Cheers! +++crowbar+++ |
Nice work :)
|
nice work mang :)
|
I think you made a lot of people happy that dont have full acces to there server
great Job! |
Nice :)
Saves me the countless emails from webcron.org saying that I have to delete my history to re-enable the job. |
Automating imports
That looks good.
I automated the stats import by adding "<meta http-equiv="refresh" content="600">" at the end of "import.php" and leaving the webpage open on my server. So now it updates every 10min and I have had no problems for 2months. :mrgreen: |
Okay, never wanted to publish this one, but you may like it.
Before I got the idea to code that little mutator, I coded a little Windows application, that periodically queried the import.php-script of my UTStats server. It's a tray application, that opens hidden. So you may not need to have an open browser window on your server anymore... Source code is provided too. Dont blame me on my coding style... hehe. Download here: PingUTStats_v1.0.zip Read the ReadMe.txt !!! Cheers! +++crowbar+++ |
wow +++crowbar+++ thats perfect for me, I can even run it as a service.
your the man :mrgreen: |
Stickied :)
|
The Trigger mutator appears in the mutatorlist on the ServerAdmin page. I allways thought that was not happening with ServerActors.
It doesn't work for me anyway. Keeps giving errors in my log. |
Quote:
|
Remove the file "UTSTATS_Trigger.int". Server actors should not need this file. Can you please post me what errors occur with the actor?
Greetings +++crowbar+++ |
Why is there an .int file in the first place?
|
The int-file is by accident in the package, but dont worry. The int file is not the source of any errors.
|
I am going to test it again tomorrow because it's a bit busy on our server now, and if there are any errors I post them here.
|
Quote:
Also will this work if I am hosting the dedicated server on my computer? That is I don't have any ftp information to give it for retreiving my log files. If it does require an FTP would setting one up on my computer suffice for this purpose? |
Most people use ftp to get the logs from the game server to the web server.
UTStats on the web server side has the ability to ftp logs over, so this mutator just invokes that web process. If you need to move logs over another way you can do that and then still use the mutator as the mutator just loads a page that firstly gets logs via ftp then imports them. Try looking in includes/config.php for more info on what UTStats can do :) |
I cannot seem to get this, downloading logs via ftp and importing them to utstats, to work. I keep getting an error when I try. I am not sure if I have everything setup correctly so I will just lay everything out for you to see. Any feedback would be highly appreciated. lol
The Facts 1. I do not run a dedicated server. I run a server on my LAN and when I am not personally using it with friends it is offline. 2. I've read about the mutator and UTPing in this thread and would like to use both, if they'll work in my case, to automatically upload and import my logs to my installation of utstats. 3. Since the logs are located on my hard drive I have setup an FTP server so that my logs may be retrieved via FTP. 4. With $ftp_use set to false I have successfully imported logs into utstats so I know my database information is correct and functional. 5. I have logged into my ftp utstats account so I know its information is also functional. 6. I am behind a firewall and use a Linksys router. The program I use, GuildFTP Daemon, has always worked for me so I do not think either of these things present an issue. Questions 1. UTStats-Trigger: Does UT have to be running for my logs to be uploaded and imported? I usually play for an hour or so a day so if this is the case I am not sure it is the way to go. 2. UTPing: Is this of any use if UT is not running? I went ahead and ran it, filled in my info, and clicked on test, but it returned an error. CONFIG.PHP Code:
<? |
It says $ftp_dir[$i][] = '/Logs';.
It has to be $ftp_dir[$i][] = 'Logs';. Try that. |
You run the server locally and the game locally, why on earth don't you just use windows to copy the logs over (scheduled task/call a batch file).
|
All times are GMT +1. The time now is 05:50 AM. |