IPv4 Fremnet Logo

Show your support

Source Log Proxy · Nov 24, 21:34 by Shannon Wynter

Yesterday I got an enquiry from Sam Cleaver regarding my Source RCON Class

He wanted to know how he could get the logs from the server using my class. Unfortunatly the answer is that you can not.

I have however written a little perl proxy and an example php script that’ll “Slow Load”/“Ajax” the log to your browser.

Go ahead and download the script

file: logproxy.pl [5.51kB]
download: 133

You’re going to want to place it on a server somewhere (preferably the same one as your apache/php is on, not nesicarily your game server)

You should edit the file configure the %servers_list variable as I’m sure the default list isn’t going to help you – Try to avoid “: “ combinations as it makes it harder to process in javascript later

<pre> my %servers_list = ( "" => "Fremans test server", "" => "Another server" ); </pre>

Once you’ve done your edits you should chmod +x logproxy.pl to make it executable.

Then go ahead and run it (Note: You should not run this script as root, it has no need to do anything special)

screen -A -m -d -S logproxy ./logproxy

Then you’re going to want to put this in a directory accessable from your webserver.

file: srclog.tar.bz2 [17.86kB]
download: 100

Note: This is a minimalistic implementation, I’ve knocked it up as an example – I might do more with it later.

You shouldn’t need to do much with it to get it working.

Now you have to go to your cs:s server (via RCON) and execute the following two commands

  1. log on
  2. logaddress_add [theaddressofthelogproxymachine]:9180

Provided you have opened port 9180 in your firewall you should see output on your srclog page.


  1. Sam    Nov 24, 23:14    #

Commenting is closed for this article.

---== Copyright Shannon Wynter - All rights reserved - All wrongs avenged ==---