Page 1 of 1
"Now Playing" signature image ?
Posted: Sun Jan 15, 2006 3:08 pm
by FatherChaos
First of all, hello everyone, I am new to these forums and to PHP

.
Would it be possible to use an image, to check when there's a new track playing on Windows Media Player, and to put its name on the image, which would be used as a signature ?
Thanks !
Posted: Sun Jan 15, 2006 3:12 pm
by Chris Corbyn
Yikes

.... If you can find out what track is playing by issuing commands on the command line then yes, by using the
system() command. Otherwise I doubt you can do it with windows media player since it's all GUI based unfortunately. My experience with Windows Media Player is close to nothing so I can't really help you with the commands you'd need to run.
Posted: Sun Jan 15, 2006 3:20 pm
by Roja
There are plugins for Winamp that do so, but I am not aware of one that does the same for Media Player.
Posted: Sun Jan 15, 2006 3:56 pm
by John Cartwright
I know msn messenger can read what song is playing on windows media player, not sure how though ..

Posted: Sun Jan 15, 2006 4:08 pm
by FatherChaos
Jcart wrote:I know msn messenger can read what song is playing on windows media player, not sure how though ..

Yes, this is on what I am basing my idea. If MSN can see exactly when Windows Media Player changes track and displays it, maybe PHP could do it too.
Posted: Sun Jan 15, 2006 4:26 pm
by evilmonkey
I thought PHP couldn't access the client computer?
Posted: Sun Jan 15, 2006 9:35 pm
by feyd
I would imagine you could find out what message to send it via the Media Player SDK's
http://msdn.microsoft.com/windowsmedia/ ... fault.aspx
Posted: Sun Jan 15, 2006 10:12 pm
by m3mn0n
Check out:
http://amip.tools-for.net/index.php?content=about
What is AMIP?
AMIP is an ultimate now playing (np) plug-in. The title stands for (Advanced mIRC Integration Plug-in).
It supports the following players: Winamp 2/5, Winamp 3, Apollo, QCD, Foobar2000 (fb2k) and iTunes.
AMIP integrates with IRC (mIRC, PIRCH, Klient, Bersirc) clients, IM and Blog clients. It can also post currently hearing song information to your site via FTP or HTTP GET and POST. AMIP can be used to generate Dynamic Image Signatures, such signatures can be used in forums, blogs or on your web site. One of the other most cool AMIP features is the Playlist Search (Ctrl+J).
Web integration
There are commands to parse file templates and to execute external processes. This allows to easily publish now playing information on the Web. The good starting point is the Web Integration help section and AMIPDS package available from downloads page. AMIPDS allows to create dynamic image signatures:
You can configure callbacks which will be invoked when player starts/quits and when playback is started/paused/stopped. By placing your code into the appropriate callback you can update song information on the Web upon event and perform other actions.
That's a neat little solution that doesn't require PHP. But if you read the page, it supports exporting data to a text file. So if you wanted to make this a PHP experiment, you could use the text file data.
So if you have a web server running on the same computer as Winamp or Windows Media Player, you could use the
file_get_contents() PHP function to grab the information and then use another
filesystem function to upload or transfer the data to an online server.
Then from there you can do the image processing with the PHP
gd library and do the song display. And maybe even add a timer feature so if an update has not occured within x minutes, it'll show 'No Songs Playing' or 'Media Player Disabled'.
Posted: Mon Jan 16, 2006 3:50 am
by onion2k
I wrote something that does this (sort of).
http://www.ooer.com/index.php?section=php&id=11 .. That works via a WinAmp plugin.
I also wrote something that does the same thing but it gets the last track played via an RSS feed from
http://www.last.fm/ and a Foobar2000 plugin. ..
http://www.last.fm/user/onion2k/ for my 'last played' stuff, and
http://www.last.fm/onyoursite/datafeeds.php for the data feed stuff. There's some cool stuff like weekly charts of your most played artists, your 'music neighbours', etc.
Posted: Wed Jan 18, 2006 10:22 am
by FatherChaos
Sami wrote:So if you have a web server running on the same computer as Winamp or Windows Media Player, you could use the
file_get_contents() PHP function to grab the information and then use another
filesystem function to upload or transfer the data to an online server.
Then from there you can do the image processing with the PHP
gd library and do the song display. And maybe even add a timer feature so if an update has not occured within x minutes, it'll show 'No Songs Playing' or 'Media Player Disabled'.
That sounds interesting... However, as said above, I am totally new to PHP. Would it be something hard to do ? Where should I start learning if I want to make a program like above?
Posted: Wed Jan 18, 2006 10:35 am
by m3mn0n
I don't know of a simple tutorial, so taking it one step at a time and learning from trial and error is the best way.
Take note of the steps I mentioned and then look at the links I posted. The manual is a great resource and it has everything you need to get started with this sort of thing.
By the way, I just noticed I didn't link directly to the file uploading manual page. Here it is:
http://php.net/features.file-upload