ampsig uptime updater [requires ampsig v9.9.10] This package enables you to update the ampsig's "uptime" data. what is ampsig? .. http://corz.org/dev/php/workshop/bael+corz.dynamic.php.sig.page.php uptime.exe will output its information in a format that curl can understand, to a file called "uptime.nfo" in the same folder. to use the updater, drop "uptime.exe" and "ut.bat" into some folder (say C:\unix\bin\), open "uptime.bat" in a decent text editor. Edit the prefs inside ut.bat to match wherever you are keeping your scripts, etc. Now, whenever ut.bat runs, it will create/replace the uptime.nfo file, and POST our uptime update to ampsig (via cURL). you only have to do this once after your peecee reboots (put a shortcut to the batch file in your startup items (in your start menu)) or, better still, use the following in your AMIP "Startup" callback.. /exec:(C:\unix\bin\ut.bat) or wherever you're keeping it. the batch file will run at media player startup and update ampsig's uptime counter automatically. if there has been any drift between your web host's clock, and yours, this will be corrected at this point. an example batch file (with additional commands for username and password, etc) is included in the distribution ("ut.bat"). note: there are two ways to do update ampsig with your uptime, if you are interested in an alternative method of utilising uptime.exe, one which you may find easier, read the notes below. have fun! ;o) (c) 2005->tomorrow! ~ cor + corz.org ;o) Please view the license for this free software, here: http://corz.org/free-scripts-licence.nfo the two methods explained: -------------------------- method one.. The first (factory default) method is to have the batch file call uptime.exe, then write any other variables to the .nfo file, and then finish up by calling cURL to POST the whole thing. done. using this method, you don't need AMIP, or even a media player to update ampsig with your uptime, though you may wish to execute the batch file from the AMIP "Startup" callback, as explained above. with this method, you simply edit ut.bat with whatever other variables you need, for example, status, title, and album.. echo -d "status=winamp starting up" >> C:\unix\bin\uptime.nfo echo -d "title=no information yet" >> C:\unix\bin\uptime.nfo echo -d "album=it's about to be decided" >> C:\unix\bin\uptime.nfo etc.. and leave it to the batch file to add the extra variables, and finish the job. that's the way ampsig uptime update comes out of the box. method two.. With the second method, you don't need AMIP, or even a batch file! simply do this command.. (in a DOS shell, or else check out "ut2.bat" in the extras folder, which contains..) C:\unix\bin\uptime.exe | C:\unix\bin\curl.exe -K C:\unix\bin\uptime.nfo -d "user=USER&pass=PASSWORD" http://domain/path/to/amp.php as you can see, you can easily add your extra POST variables onto the command line itself (curl is rather flexible) which, amazingly, will POST the variables from the uptime.nfo file AND the command-line, all-in-one, so if you felt kinky, you could make a shortcut to a bat file containing only that command (ut2.bat) and run it from wherever (start menu, startup items, AMIP preset / callback, desktop icon, whatever) and keep ampsig perpetually informed of your puter's uptime. So there you have it, two ways to keep ampsig in sync with your uptime! {there is a third method, where you use the batch file to create an AMIP "Template" which is then transformed by AMIP.. /exec:(C:\unix\bin\ut3.bat) /template:(C:\unix\bin\uptime.nfo) C:\unix\bin\uptime.out /exec:(C:\unix\bin\curl.exe) -K C:\unix\bin\uptime.out so you could do URL encoding, etc.. echo -d "album=&func_ue(winamp starting up)" >> C:\unix\bin\uptime.nfo echo -d "example=&func_ue(Winamp %ver)" >> C:\unix\bin\uptime.nfo and in theory, add AMIP variables but sadly the %vars are interpreted as unfinished DOS batch variables and never make it to the second stage, so this method has been depricated! *g* at any rate cURL doesn't seem to mind about spaces coming out of the .nfo file, and there are few AMIP variables that are actually useful in this (song-less) context.)