Question -> php website mining / programming

Started by mitt, March 06, 2009, 10:12:47 AM

Previous topic - Next topic

mitt

This might be a stretch for the DMF, but you is some smart people...

I am working on a personal pet project involving displaying full screen a streaming song's title - either in a separate web browser, or a screen saver. 

Some streaming sites display the song title up in the browser title (the <title> info), so I thought pulling the title information might work and started there.

I found a way to do it in a separate browser using javascript, but only if the target website is on the same domain as my browser, so that is useless.

I also found a way to do it in a separate browser using php, loading the page as a file and pulling what is in the <title> - this works for every site I have tried except the one I want - slacker.com.  I get a streaming error, and I don't think my php runs.

Any other ideas how to do it?  Do browsers store the title info locally as an object that could be mined with vba?  Could I use php to find the song information further down in the target site instead of the <title>?   I am just a hobby programmer, so I am not sure what other methods are out there.

mitt

sugarcrook

From a quick glance, it appears that slacker.com updates the page title using the DOM, not by changing the markup. 

Short answer, I don't think your idea will work for this case because you'd need to emulate a full browser, including the DOM.  It might be possible to do this with something like Firefox and listen for changes to the DOM, then react accordingly.  That's a stab in the dark.  Maybe Greasemonkey is a decent place to start. 

There might be another way to do this, but it's not obvious to me. 
2013 BMW R1200R
2008 BMW K1200GT (Traded)
2007 Ducati Monster 695 (Sold)