aMule Forum

English => aMule News => Topic started by: uberpenguin on May 22, 2004, 07:56:57 PM

Title: AMPS - AMule PHP Statistics
Post by: uberpenguin on May 22, 2004, 07:56:57 PM
Hi everybody!  I've been working on an update/replacement for the aged aStats that is written in PHP and contains a lot more niceties than did the old aStats (i18n support, dynamically updated, cross-platform support, theme support planned).

If you would like to test AMPS and help me iron out the bugs (hopefully I have caught  most of them), you can download it here:

http://download.berlios.de/amule/amps-0.7.5.tar.gz

You can also see a demo here (when/if my computer is up and running):

http://stilvollerhut.ath.cx/~mattb/amps/

Please read the README file in its entirety before proceeding as it contains some important notes about setting things up.  AMPS ONLY WORKS WITH AMULE CVS AND 2.0RC RELEASES for reasons described in README (although it's not difficult to make it work with 1.2.6; I developed AMPS using that version). If you would like to mess around with the behavior of AMPS, read the SETTINGS document (just don't come complaining if you break it :P).  Soon I plan to add some theme support, so if you find a colour/icon/layout scheme you like, have a look at style.css and make sure to contact me if you want to have that theme included in future AMPS revisions.

If you find any bugs that need fixing or have any feature requests, please inform me of them.

If you would like to add a translation, please see the thread in the translations forum.

Enjoy!

-uberpenguin
Title: Re: AMPS - AMule PHP Statistics
Post by: deltaHF on May 22, 2004, 08:11:54 PM
and feel free to create onlinesig images so we can make a gallery later and everyone can dl and use them in amps/cas/wxcas ;)

you can post it in the gfx forum -> http://www.amule.org/amule/thread.php?threadid=2315&sid=

thx & greets
Title: Re: AMPS - AMule PHP Statistics
Post by: Stevil on May 25, 2004, 02:27:17 AM
@uberpenguin

runs under FreeBSD 5.2.1 --> http://stevil.no-ip.com
still a problem with 1.2.6 and output...but runs ;)
Title: Re: AMPS - AMule PHP Statistics
Post by: uberpenguin on May 25, 2004, 02:37:07 AM
The reason AMPS doesn't work with 1.2.6 is because amulesig.dat is written to ~/.aMule.  Most peoples' webserver configurations run the daemon as a user who cannot read private directories like home (and for good reason!).  If you modify your aMule source to write amulesig.dat to /tmp or some other shared filesystem or run apache as a privileged user (NOT RECOMMENDED), then you can get AMPS working with 1.2.6...

-uberpenguin
Title: Re: AMPS - AMule PHP Statistics
Post by: Stevil on May 25, 2004, 04:44:48 AM
thx, i'll try it with CVS ;)
Title: Re: AMPS - AMule PHP Statistics
Post by: deltaHF on May 27, 2004, 07:01:56 PM
new version: http://download.berlios.de/amule/amps-0.7.1.tar.gz  :)

works 100% on FreeBSD too ;)
Title: Re: AMPS - AMule PHP Statistics
Post by: Stevil on May 28, 2004, 12:26:47 AM
you've a changelog? :)
Title: Re: AMPS - AMule PHP Statistics
Post by: uberpenguin on May 28, 2004, 01:03:05 AM
Quote
Originally posted by Stevil
you've a changelog? :)

It's the file named CHANGELOG :)

-uberpenguin
Title: Re: AMPS - AMule PHP Statistics
Post by: Stevil on January 05, 2005, 08:59:12 PM
FreeBSD 5.3-RELEASE
AMPS 0.7.1
aMule-2.0.0rc8

--> http://stevil.no-ip.com/amps/

no output :(

any suggetions?
Title: Re: AMPS - AMule PHP Statistics
Post by: deltaHF on January 05, 2005, 09:05:54 PM
wrong path to your onlinesig.dat maybe ?
Title: Re: AMPS - AMule PHP Statistics
Post by: Stevil on January 05, 2005, 09:36:52 PM
/tmp

dont think so :(
Title: Re: AMPS - AMule PHP Statistics
Post by: deltaHF on January 05, 2005, 09:37:50 PM
ok, i'll review it tomorrow
Title: Re: AMPS - AMule PHP Statistics
Post by: Stevil on January 05, 2005, 10:10:16 PM
ok, thx for support! ;)
Title: Re: AMPS - AMule PHP Statistics
Post by: thedude0001 on January 06, 2005, 02:34:01 PM
Very nice programm, I really like it.

But I've got a feature request: It would be really great if there was some way to export the image to another machine, so I can upload it to my Webspace. I would like to have this picture in my signature in sokme web forums, but I think this would be too much for my 128 kbit/s upload... ;(

So I would really appreciate it if there was any way to save the image to my hard drive so i can upload it with a cronjob. And if there is such a way and i was just too dumb to see it: Sorry, but i don't really understand a single bit of PHP.   :rolleyes:
Title: Re: AMPS - AMule PHP Statistics
Post by: darksidex on January 10, 2005, 09:49:48 AM
If you use X, you should use wxCas, it does it.
Title: Re: AMPS - AMule PHP Statistics
Post by: uberpenguin on January 10, 2005, 02:17:23 PM
Quote
Originally posted by thedude0001
So I would really appreciate it if there was any way to save the image to my hard drive so i can upload it with a cronjob. And if there is such a way and i was just too dumb to see it: Sorry, but i don't really understand a single bit of PHP.   :rolleyes:
Well, as darksidex said it may be easiest to use wxcas.  HOWEVER, notice how the script is called to generate the image, that is, click on the image and look at the URL in your browser.  If you call that URL from any program it will return a valid PNG/JPG/whatever image.  So, from your shell script you can simply do this:

Code: [Select]
wget -O filename.png "http://localhost/path/to/amps/?lang=en&sig_image"or
Code: [Select]
curl -o filename.png "http://localhost/path/to/amps/?lang=en&sig_image"You'll want to change the lang parameter to the two-digit language code that you want.

This will write filename.png that contains the signature image to the current directory.  From there your cron job can push it wherever you would like.

-uberpenguin
Title: Re: AMPS - AMule PHP Statistics
Post by: Stevil on January 10, 2005, 11:36:31 PM
as freeBSD newb....how do i use wxcas? ;)


EDIT:
- > make config
gave me the CAS (Compile C aMule Statistics (+GUI)). option.
i've build the port...but still...no AMPS output! :(
Title: Re: AMPS - AMule PHP Statistics
Post by: thedude0001 on January 11, 2005, 02:43:51 PM
Hmm, OK, I did already figure out how to get a link to only the picture but then missed the point of just 'wget'ing it... Every day I learn something new, thanks for your help on that. :D

I am / was already playing around a bit with cas / wxcas just to take a look on the output of the different programs, but I liked AMPS the most...
Title: Re: AMPS - AMule PHP Statistics
Post by: thepolish on January 11, 2005, 06:50:21 PM
Stevil,

Dunno on freebdsd, but on linux wxCas is compiled by default, though u can force it by --enable-wxcas if u have problems. The exe is wxcas (no C upercase)

The complete user manual is availbale here: http://download.berlios.de/amule/wxcas_user_manual.pdf

Thepolish
Title: Re: AMPS - AMule PHP Statistics
Post by: thedude0001 on January 13, 2005, 08:23:03 PM
I have a little problem with AMPS not showing the correct runtime of amule:

I started amule, everything is fine. Then, 18 hours later, I started amuleweb and AMPS starts telling me "amule has been running for 2 minutes". Now he shows me the time amule web has been runnning. If I shutdown amuleweb AMPS once again shows the uptime of amule...

(Maybe this is not the best place to post it, but I didn't find a better one... What about a section "amule related tools that are not a part of amule" somewhere?)
Title: Re: AMPS - AMule PHP Statistics
Post by: GonoszTopi on January 24, 2005, 10:03:11 AM
thedude0001, apply this patch to always get the correct uptime of amule. Maybe uberpenguin should include it in the next release.
Title: Re: AMPS - AMule PHP Statistics
Post by: uberpenguin on January 25, 2005, 01:48:04 AM
Quote
Originally posted by GonoszTopi
thedude0001, apply this patch to always get the correct uptime of amule. Maybe uberpenguin should include it in the next release.
Ah yes; AMPS was written before amuleweb existed, so the assumption that "amule" was unique worked up until now...  I'll use that in the next version.

-uberpenguin
Title: Re: AMPS - AMule PHP Statistics
Post by: thedude0001 on January 25, 2005, 06:16:00 AM
Works great, thank you GonoszTopi  :D