PDA

View Full Version : HTML code to get current iTunes song


rasmits
2007-03-18, 21:22
Is there any HTML code (or something) that will display your current iTunes track in simple text, not an image?

chucker
2007-03-18, 21:25
You'll have to give more information. By default, iTunes doesn't upload such information at all; it does, however, have interfaces of delivering the information through OSA (AppleScript, etc.) or, on Windows, WSH (VBScript, etc.).

Does the web server run on the same machine as the one that runs iTunes? (Probably not.) Otherwise, you'd have to locally run a script (or have some sort of plug-in or external tool) that uploads the info.

rasmits
2007-03-18, 21:29
Does the web server run on the same machine as the one that runs iTunes? (Probably not.) Otherwise, you'd have to locally run a script (or have some sort of plug-in or external tool) that uploads the info.No, it doesn't. It would just be a standard FTP server.

chucker
2007-03-18, 21:31
http://dougscripts.com/itunes/scripts/scripts03.php?page=1#trackreporter ?

turtle
2007-03-18, 21:36
http://dougscripts.com/itunes/scripts/scripts03.php?page=1#trackreporter ?

Ok, so how did that site know my name? There is a box on the right-hand side begging for donations that used my name. I like this concept for my future site (not the begging just that ID part).

PKIDelirium
2007-03-18, 21:38
That's an Amazon box. If you're logged in (with cookie) to Amazon it can read it.

It freaked the shit out of me the first time I saw one. :D

chucker
2007-03-18, 21:39
Ok, so how did that site know my name? There is a box on the right-hand side begging for donations that used my name. I like this concept for my future site (not the begging just that ID part).

That's Amazon.com's doing. If you're logged in to Amazon.com, then a page using Amazon.com's "honor system" will show the real name you gave to Amazom.com. This does not mean, by the way, that that site (Doug's AppleScripts for iTunes, in this case) will actually see your name; the 'magic' happens entirely between your browser and Amazon.com. (So there's no privacy issue to it. You're already logged in to the site anyway.)

(edit) PKIDelirium beat me to it.

rasmits
2007-03-18, 21:41
Woww, okay, so how do I create a dynamically updating line of text from the file it produces?

chucker
2007-03-18, 21:42
Woww, okay, so how do I create a dynamically updating line of text from the file it produces?

I thought the script takes care of that? As far as I can tell, it uploads to your FTP server at a specified interval (such as once a minute).

Or you mean you want it embedded in a web page?

rasmits
2007-03-19, 00:41
Or you mean you want it embedded in a web page?Yes, that's what I mean.

chucker
2007-03-19, 00:51
Well, if you don't want to bother with SSI, PHP or something more complex, you could use client-side embedding, such as through the embed tag:
<p><embed src="ftp://url/to/your/file.txt" type="text/plain"></embed></p>

rasmits
2007-03-19, 01:34
Cool, I'll try that. Thank you.