Jump to content
  • 0

Serverlog to webpage


Stickybit

Question

19 answers to this question

Recommended Posts

  • 0
Posted

Excellent :) Beats a ghetto Mapped Drive Option. I Look forward to checking out when more Capable, and not "Cleaning" :)

* I used to Run Dusty's Stats and had an Automated Script to Pull from my *Nix Webserver, and Download the Stats from the Dedi there. Problem w/ that was, his Stats Logged to a Database, and when logged, there was No UniqueIdentifier Set, so the Same Data that was already sent to DB was Duplicated.

Also, the Database had no problem reaching 10 MB in ~ 20 days or so. Is there a PHP Call I can Throw to have an IIS Box Hit an FTP, Replace the Current File, and process the Stat Script?

Here was the Nix Code I was Using:

exec("wget -q ftp://user:[email protected]:21/mtaserver.log");

That would Grab from the Root MTA Home Dir of the FTP, and I'd have my Log. Since the Current Stats @ Mta.funtimebliss.com are just reading from a Local Log, if I can use the Code Above on a Windows Box, or Similar, I'd be a happy boy :)

  • 0
Posted

I see no problem in running the script on a PHP capeable IIS server... unless the Windows version of MTA server is using an other logformat.

Instead of executing wget.. you can use fopen to open the remote file in the mode needed.

-Stickybit

  • 0
Posted

Parse error: parse error in /var/fr4g/serverlog.php on line 60

:(

only thing I changed was put the serverlog address as an absoloute path

  • 0
Posted

The script has been slightly modyfied - so it matches version 0.5. Click on the "Bugfixed version" link in the above posting, to get the new version.

MTA team: Why do you erase the logfile when restarting the server? It would be nice if you just apended data to the logfile instead of emptying it on server starts.

Regards Sticky

  • 0
Posted

That's not an easy task - since MTA traffic is UDP - and the software is closed source. A reliable script for that purpose would have to come from the MTA team, or from some nasty hacker / cheater who has revese enginered the MTA traffic.

Regards Stickybit

  • 0
Posted

Great little script....:)

But ;).....is there anyway to switch the the way the log displays as it reads from bottom to top.

Be nice to have it read from top to bottom.

(Oldest post on top reading down)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...