verify if embed code still works

Discussion in 'PHP' started by surfmore, Aug 20, 2009.

  1. #1
    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.
     
    surfmore, Aug 20, 2009 IP
  2. Bohra

    Bohra Prominent Member

    Messages:
    12,573
    Likes Received:
    537
    Best Answers:
    0
    Trophy Points:
    310
    #2
    Well does it link directly to a file ? if yea using php you could check if that file exist or no
     
    Bohra, Aug 20, 2009 IP
  3. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #3
    premiumscripts, Aug 20, 2009 IP
  4. premiumscripts

    premiumscripts Peon

    Messages:
    1,062
    Likes Received:
    48
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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.
     
    premiumscripts, Aug 20, 2009 IP
  5. jjwdesign

    jjwdesign Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    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
     
    jjwdesign, Aug 20, 2009 IP
  6. surfmore

    surfmore Peon

    Messages:
    118
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    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>
     
    surfmore, Aug 20, 2009 IP