PDA

View Full Version : Winamp & PHP


Pauly
April 28th, 2006, 19:55
Ok, a couple years a go I had a plugin or program that when I played a song in Winamp, it automatically updated my website with my currently playing song. If I wasn't listening to anything, it would give a message (customizable), for example "Winamp is currently not playing" or "I am currently offline".

It was a really nifty program, it also allowed you to hit a button that auto-screenshot and uploaded the image, creating a thumbnail link so users could click to view your full desktop.

I have a general idea of how it worked - In that it required FTP access, and I think a destination folder etc. To upload the files to.

But suffice to say, I can't find it for the life of me, has anyone else come across it and could perhaps give me the name so I can download it again? Or even one that's similar?

sea otter
April 29th, 2006, 00:34
http://hotscripts.com/search/9914217.html

Entry #2 (netjukebox) might do the trick?

Pauly
April 29th, 2006, 01:22
Not quite, I'm looking for something more automated, so if I play a song in Winamp it shows, if I'm not playing one, it doesn't. The problem wit hthat particular one is that you need to add them :(

SpyAmp looks more like what I want to do, but it allows users to access/download which I'm not comfortable with.

Dan
April 29th, 2006, 05:12
You're probably looking for a self-hosted solution, but last.fm is pretty popular and seems to do what you want. I've been using it for a while and it's pretty cool.

rich w
April 29th, 2006, 08:52
This is how I'd do it:

You want a winamp plugin which saves the currently saves song to a text file on your machine. There was one for winamp 3, but I don't know about now...

You then use PHP to read that text file, and generate an image accordingly.

On your website, you'd then do something like this:
<img src="http://81.12.12.23:8088/winamp.php" />
And that would show the image on your website. The great thing about that script is that it only checks out what song you're playing when a user requests the page, so there's less bandwidth and processing power used.

rich w
April 29th, 2006, 09:02
I've just built one myself...

This is the winamp plugin: http://spyamp.sf.net/
It basically allows you to access winamp remotely, and see what its currently doing.
I then used PHP to parse that file, and voila, I had the currently playing song :)

rich w
April 29th, 2006, 14:13
If anyone wants to look here is the output:
http://81.110.66.156:8088/ticker.php

If you want the code etc just shout :)

Pauly
April 29th, 2006, 17:32
Hey man, that's nifty!! I assume I can design the image it will generate myself? I'd like to use that if you don't mind?

rich w
April 29th, 2006, 17:37
Let me know your email address n i'll send the code over.
Yup i've designed it so you create an image for the background yourself, and the script will use that and compress it to suit.
You can also use ANY ttf font(s), colours etc...

Pauly
April 29th, 2006, 17:38
Nice one!

Pauly
April 29th, 2006, 18:59
For reference, Rich's script works great, as does SpyAmp found in the link above, however if you're behind a crappy router and tyring to connect from a remote server like myself, and have no control over the ports etc. It pretty much won't work.

Very nice work Rich though! And thanks again.

rich w
April 29th, 2006, 20:19
We were almost there! Just need to sort out port forwarding on your router.

Pauly
April 29th, 2006, 20:23
Yep problem is I don't have any control. It's just a grey box, no software or anything else :lol:

Jimerson
April 30th, 2006, 00:29
Try this out:

http://code.nathanbolender.com/PHP/djstatus/

I used it with my radio station. Just edit the code you need out. and ignore the dj stuff if you don't want to use it. Its all server side.

If you have any questions about it do not hesitate to ask. I have gotten to know this script very well.

-Jim

Pauly
April 30th, 2006, 00:33
Does this run on my side and connect to the server to display the info?

Jimerson
April 30th, 2006, 00:42
It runs on the webhosting side. and uses the same port as a connecting client. so if I regular listener can connect, this will work.

-Jim

Pauly
April 30th, 2006, 00:46
Hm, I'll check it out, thanks :)

Jimerson
April 30th, 2006, 00:46
No problem :),

Let me know if I can be of any help.

-Jim

rich w
April 30th, 2006, 12:33
It wont work as it'll still require a port to be open...

Jimerson
April 30th, 2006, 17:13
I don't know of anything that will work if a port can't be opened.

Sorry I was not able to help,

-Jim

Jimerson
May 1st, 2006, 06:28
Possibly you could do something with this:

http://www.oddsock.org/tools/dosomething/

-Jim