On Wed, January 24, 2007 10:25 am, sleestak2@xxxxxxxxxxxxx wrote: > I'm hoping y'all can help me with a bit of a php code problem I'm > having. > > What I'm trying to do is link to YouTube videos (more than one in a > single > webpage). However, because I'm worried about the videos going away > and the > links going bad, I'd like to use PHP to check if the link is good; if > it's > good, display the video link, else display a static image that I have > on my > servers. > > Where I'm having troubles is in the checking of whether the url is > good. I > think part of the problem is YouTube itself. I've tried file() and > fsockopen(), but neither seem to work. The problem with 'file' is that you are trying to suck down the ENTIRE video, probably... I dunno what you did wrong with fsockopen... I personally would have done fopen and read the headers to see if it was valid. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php