You are an unregistered user, you can register here
Navigation

Information

Site

Donations
If you wish to make a donation you can by clicking the image below.


 
Go Back   The Unreal Admins Page > Forums > Hosted Forums > UTStats > General Chat

Reply
Thread Tools Display Modes
  #1  
Unread 9th July, 2005, 12:14 PM
+++crowbar+++'s Avatar
+++crowbar+++ +++crowbar+++ is offline
Rampage
 
Join Date: Aug 2004
Location: GERMANY
Posts: 62
Talking 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 [email address]

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+++

Last edited by +++crowbar+++ : 9th July, 2005 at 12:17 PM.
Reply With Quote
  #2  
Unread 9th July, 2005, 06:47 AM
Azazel's Avatar
Azazel Azazel is offline
Administrator
 
Join Date: Jul 2002
Location: UK
Posts: 2,408
Default

Nice work
__________________

Phoenix Alliance - The Movie
Revisionistic Movie
The Unreal Admins Page - the resource for unreal admins
Reply With Quote
  #3  
Unread 9th July, 2005, 06:48 AM
^D@rk^SwaT ^D@rk^SwaT is offline
Rampage
 
Join Date: Aug 2004
Posts: 65
Default

nice work mang
Reply With Quote
  #4  
Unread 9th July, 2005, 08:12 AM
SixtSense's Avatar
SixtSense SixtSense is offline
Holy Shit!!
 
Join Date: Jun 2004
Location: The Hague ,Holland
Posts: 1,001
Default

I think you made a lot of people happy that dont have full acces to there server
great Job!
__________________
DMC HomePage
------------------------------------------------------
Other Projects:
Fun-Dump.com 5k uniques daily
Phunneyshit.net 2k uniques daily
Trash n Babes 1,5k uniques daily
Babe-Dumper 1,5k uniques daily <New Site
________________________________
We allways search for "active" plug exchange
Reply With Quote
  #5  
Unread 9th July, 2005, 08:39 AM
PizzaMan's Avatar
PizzaMan PizzaMan is offline
Holy Shit!!
 
Join Date: Jun 2004
Location: Bergen - Norway
Posts: 2,389
Default

Nice

Saves me the countless emails from webcron.org saying that I have to delete my history to re-enable the job.
Reply With Quote
  #6  
Unread 10th July, 2005, 02:57 AM
Adrian[ADIES]'s Avatar
Adrian[ADIES] Adrian[ADIES] is offline
Godlike
 
Join Date: May 2005
Location: UK NorthWest
Posts: 252
Default 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.
__________________
www.adies.net - Dedicated to Strangelove-CTF.

Download my UT map CTF-Microhec33 CTF-Microhec33.zip :::: Read The Review
Reply With Quote
  #7  
Unread 10th July, 2005, 04:16 PM
+++crowbar+++'s Avatar
+++crowbar+++ +++crowbar+++ is offline
Rampage
 
Join Date: Aug 2004
Location: GERMANY
Posts: 62
Default

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+++
Reply With Quote
  #8  
Unread 11th July, 2005, 02:03 PM
Adrian[ADIES]'s Avatar
Adrian[ADIES] Adrian[ADIES] is offline
Godlike
 
Join Date: May 2005
Location: UK NorthWest
Posts: 252
Default

wow +++crowbar+++ thats perfect for me, I can even run it as a service.
your the man
__________________
www.adies.net - Dedicated to Strangelove-CTF.

Download my UT map CTF-Microhec33 CTF-Microhec33.zip :::: Read The Review

Last edited by Adrian[ADIES] : 11th July, 2005 at 02:05 PM. Reason: more reasons why its perfect for me
Reply With Quote
  #9  
Unread 12th July, 2005, 11:06 AM
Azazel's Avatar
Azazel Azazel is offline
Administrator
 
Join Date: Jul 2002
Location: UK
Posts: 2,408
Default

Stickied
__________________

Phoenix Alliance - The Movie
Revisionistic Movie
The Unreal Admins Page - the resource for unreal admins
Reply With Quote
  #10  
Unread 25th July, 2005, 03:01 AM
DonvanVliet's Avatar
DonvanVliet DonvanVliet is offline
Godlike
 
Join Date: Jan 2004
Location: The Little House I Used To Live In
Posts: 406
Default

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.
__________________
[DoC]Sniperclan website
[DoC]Sniperclan Forums

Interviewer: Is it possible to say where you get your musical influences from?
Frank Zappa: Sometimes you get it from chicken. Sometimes from coffee.
Reply With Quote
  #11  
Unread 25th July, 2005, 08:57 AM
PizzaMan's Avatar
PizzaMan PizzaMan is offline
Holy Shit!!
 
Join Date: Jun 2004
Location: Bergen - Norway
Posts: 2,389
Default

Quote:
Originally Posted by DonvanVliet
The Trigger mutator appears in the mutatorlist
It doesnt appear in my list.
Reply With Quote
  #12  
Unread 25th July, 2005, 09:25 AM
+++crowbar+++'s Avatar
+++crowbar+++ +++crowbar+++ is offline
Rampage
 
Join Date: Aug 2004
Location: GERMANY
Posts: 62
Default

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+++
Reply With Quote
  #13  
Unread 26th July, 2005, 05:29 PM
DonvanVliet's Avatar
DonvanVliet DonvanVliet is offline
Godlike
 
Join Date: Jan 2004
Location: The Little House I Used To Live In
Posts: 406
Default

Why is there an .int file in the first place?
__________________
[DoC]Sniperclan website
[DoC]Sniperclan Forums

Interviewer: Is it possible to say where you get your musical influences from?
Frank Zappa: Sometimes you get it from chicken. Sometimes from coffee.
Reply With Quote
  #14  
Unread 26th July, 2005, 06:01 PM
+++crowbar+++'s Avatar
+++crowbar+++ +++crowbar+++ is offline
Rampage
 
Join Date: Aug 2004
Location: GERMANY
Posts: 62
Default

The int-file is by accident in the package, but dont worry. The int file is not the source of any errors.
Reply With Quote
  #15  
Unread 26th July, 2005, 06:04 PM
DonvanVliet's Avatar
DonvanVliet DonvanVliet is offline
Godlike
 
Join Date: Jan 2004
Location: The Little House I Used To Live In
Posts: 406
Default

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.
__________________
[DoC]Sniperclan website
[DoC]Sniperclan Forums

Interviewer: Is it possible to say where you get your musical influences from?
Frank Zappa: Sometimes you get it from chicken. Sometimes from coffee.
Reply With Quote
  #16  
Unread 2nd August, 2005, 02:24 PM
Mulsiphix Mulsiphix is offline
Forum Newcomer
 
Join Date: Aug 2005
Posts: 7
Default

Quote:
Your UTSTATS-installation *MUST* be configured for ftp-import.
How do I know if it is set to ftp-import? I went over the utstat documentation and I could not find anything called ftp-import. Please explain.

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?
Reply With Quote
  #17  
Unread 3rd August, 2005, 06:26 AM
Azazel's Avatar
Azazel Azazel is offline
Administrator
 
Join Date: Jul 2002
Location: UK
Posts: 2,408
Default

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
__________________

Phoenix Alliance - The Movie
Revisionistic Movie
The Unreal Admins Page - the resource for unreal admins
Reply With Quote
  #18  
Unread 3rd August, 2005, 08:16 PM
Mulsiphix Mulsiphix is offline
Forum Newcomer
 
Join Date: Aug 2005
Posts: 7
Default

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.

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:
<?
// Database connection details
$dbname = "censored for this post but proven to work 100%";
$hostname = "censored";
$uname = "censored";
$upass = "censored";

$dbconnect = mysql_connect($hostname,$uname,$upass);
$dbconnect2 = mysql_select_db($dbname);

// The key needed to run the import script
$import_adminkey = 'censored';

// When runnning from the command-line (cron jobs):
// The absolute path to UTStats's home directory.
// Only needed if you're starting the importer from another directory
// Leave emtpy if unsure
$import_homedir = '';

// Use the MySQL temporary tables feature?
// Available since MySQL 3.23 - requires CREATE TEMPORARY TABLE privilege since 4.0.2
$import_use_temporary_tables = true;		// set to true if available

// Use temporary heap tables?
// This will (at any cost) keep the entire table in RAM and may speed and/or fuck things up
$import_use_heap_tables = false;				// DON'T USE IF YOU DON'T KNOW WHAT YOU'RE DOING!

// Log files start with...
$import_log_start = "Unreal.ngLog";

// Log files end with...
$import_log_extension = ".log";

// How to backup logfiles?
// Possible values: yes      - move logfiles to the backup directory
//                  no       - don't make a backup. The file will be lost after it was imported
//                  compress - will compress the logfile and move it to the backup directory
//                             It'll first try bzip2 compression, then gzip (your php must be
//                             compiled to support these)
//                             If both fail, it will backup the uncompressed log
//                  gzip     - same as compress but will only try to gzip the file
$import_log_backup = "gzip";

// Purge old logs after x days. 0 to disable.
$import_log_backups_purge_after = 0;


// After how many seconds should we reload the import page?
// This is to prevent the 'maximum execution time exeeded' error. It will reload
// the page after the amount of seconds you specify in order to bypass php's time limit.
// Set to 0 to disable (f.e. if your php does not run in safe mode)
$import_reload_after = 10;

// Ignore bots and bot kills/deaths?
$import_ignore_bots = false;

// How to deal with banned players?
// 1 - (recommended) import the player and display him/her on matchpages (without values :D)
//     but don't include him/her in rankings and don't allow to show individual player stats
//     You may unban a player banned with this setting and all stuff will display again
// 2 - don't import at all
//     will lead to 'strange' results on matchpages because kills of and against this player
//     won't be shown; efficiency etc. will be calculated including these kills though.
$import_ban_type = 1;

// Try to import logs from previous versions of UTStats
// Set this to true and you'll probably some strange results - You've been warned ;)
$import_incompatible_logs = false;

// Don't import if the gametime was less than x minutes. Set to 0 to import all logs.
$import_ignore_if_gametime_less_than = 0;


// UTStats can download and manage your UTDC logs
// Enable downloading of UTDC logs?
$import_utdc_download_enable = false;

// Log files start with...
$import_utdc_log_start = "[UTDC]";

// Log files end with...
$import_utdc_log_extension = ".log";

// Compress UTDC logfiles after download? [compress/gzip/no]
// (see $import_log_backup for available options)
$import_utdc_log_compress = "compress";

// Purge old UTDC logs after x days. 0 to disable.
$import_utdc_log_purge_after = 0;


// Enable the creation of pictures? (Signature pictures for users where they can see their current ranking and stuff)
// Requires GD- and FreeType support.
// see config_pic.php for picture configuration options
$pic_enable = true;


// FTP Connection Details
$ftp_use = true;			      	// Whether to auto get the log files
$ftp_interval = 0;			     	// How often in minutes to allow stats update
$ftp_type = 'sockets';				// Which FTP module do you want to use?
											// sockets - (recommended)
											//           Use PHP's socket extension to connect to the FTP server
											//           will fallback to 'pure' if no sockets available
											// pure    - Use fsockopen() to connnect to the FTP server
											//           should work with any php version
											// php     - Use PHP's FTP extension (must be compiled in)
											//           Debugging will not be available with this module and
											//           error handling may not be as good as with the other modules

$ftp_debug = false;					// Debugging output that may help you to resolve ftp problems


// UT Server 1
$i = 0;
$ftp_hostname[$i]	= '67.166.240.114';	// FTP server location here
$ftp_port[$i] 		= 48255;			// FTP Port - do not remove this even if you do not use ftp
								// Do not add '' around the port either
$ftp_uname[$i] 	= 'censored';		// FTP Username
$ftp_upass[$i] 	= 'censored';	     // FTP Password
$ftp_dir[$i][] 	= '/Logs';		// Directory of the log files - MUST NOT end with a /
//$ftp_dir[$i][] 	= '/';			// You may repeat this entry as often as you wish but please remember
//$ftp_dir[$i][] 	= '/';			// to enter the directory relative to the last one
//$ftp_dir[$i][] 	= '/';			// (or use an absolute path)
$ftp_passive[$i] 	= true;			// Use passive transfer mode for this connection?
$ftp_delete[$i] 	= false; 			// Delete logs after download?

/*
// UT Server 2 --- Uncomment this one if needed, or copy/paste the block above if more servers are needed.
$i++;
$ftp_hostname[$i]	= '';				// FTP server location here
$ftp_port[$i] 		= 21;				// FTP Port - do not remove this even if you do not use ftp
											// Do not add '' around the port either
$ftp_uname[$i] 	= '';				// FTP Username
$ftp_upass[$i] 	= '';				// FTP Password
$ftp_dir[$i][] 	= '/';			// Directory of the log files - MUST NOT end with a /
//$ftp_dir[$i][] 	= '/';			// You may repeat this entry as often as you wish but please remember
//$ftp_dir[$i][] 	= '/';			// to enter the directory relative to the last one
//$ftp_dir[$i][] 	= '/';			// (or use an absolute path)
$ftp_passive[$i] 	= true;			// Use passive transfer mode for this connection?
$ftp_delete[$i] 	= true; 			// Delete logs after download?
*/
?>
Reply With Quote
  #19  
Unread 3rd August, 2005, 11:41 PM
DonvanVliet's Avatar
DonvanVliet DonvanVliet is offline
Godlike
 
Join Date: Jan 2004
Location: The Little House I Used To Live In
Posts: 406
Default

It says $ftp_dir[$i][] = '/Logs';.

It has to be $ftp_dir[$i][] = 'Logs';.

Try that.
__________________
[DoC]Sniperclan website
[DoC]Sniperclan Forums

Interviewer: Is it possible to say where you get your musical influences from?
Frank Zappa: Sometimes you get it from chicken. Sometimes from coffee.
Reply With Quote
  #20  
Unread 4th August, 2005, 01:42 PM
Azazel's Avatar
Azazel Azazel is offline
Administrator
 
Join Date: Jul 2002
Location: UK
Posts: 2,408
Default

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).
__________________

Phoenix Alliance - The Movie
Revisionistic Movie
The Unreal Admins Page - the resource for unreal admins
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:57 AM.


 

All pages are copyright The Unreal Admins Page.
You may not copy any pages without our express permission.