Hello, I have a website where I embed several videos from other sites. I see there are some that are not working, but I didnt want to check one by one as there too many videos. Is there a way that I could verify if each one is working automatically using php (preferred) or other language? thanks.
Use this code: http://www.php.net/manual/en/function.fsockopen.php#39948 It will not download the entire video so it should be fast.
Oh and btw, I'm not sure what flash player you're using, but perhaps the flash player can also report errors. This would be the better way because if you do the above, you'd have to do that for example every week for every file. If instead the flash player reports when a file is missing, you can take immediate action and it takes up much less resources. Unfortunately I cannot help you with that, but maybe it will give someone else an idea. Edit: if you just use the embed code from the sites and their associated players, this obviously will not work. However, youtube does provide a javascript API: http://code.google.com/apis/youtube/js_api_reference.html#Events So you'll have to subscribe to the onError event and then simply send that data back to a PHP page so you can do the appropriate thing.
Most of these embedded videos use some sort of Flash player to play them within a window. If you look at your HTML code you should see an "object" in there; just search for it. Then try to figure out which one it is. I prefer to use the "FlowPlayer" - Google search for it. It might also be that the video has moved or is no longer available. In that case, you're out of luck. If it's a video from another Web site, they may have noticed that you were "leaching" the video from them. Jeff
Here are samples of embed code not working anymore. It doesn't link to any specific video file. How would I do it? <embed src="http://pornotube.com/player/v.swf?v=bT00NzEyOCZhbXA7bG9jYWw9ZmFsc2UmYW1wO3U9NDM=" loop="false" quality="high" width="480" height="400" name="pornoPlayer" allowfullscreen="true" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> <object width="510" height="400" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="movie" value="http://www.xvideos.com/sitevideos/flv_player_site_v3.swf" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="id_video=1567&isembed=true" /><embed src="http://www.xvideos.com/sitevideos/flv_player_site_v3.swf" allowScriptAccess="always" width="510" height="400" menu="false" quality="high" bgcolor="#000000" allowFullScreen="true" flashvars="id_video=1567&isembed=true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>