Need help with php script for autochecking youtube videos

Discussion in 'PHP' started by parallelsruler, Oct 9, 2010.

  1. #1
    Hi,

    I want to write a php script for autochecking if a youtube video is allowed for embedding in a 3rd party site, using the video id. I was going through youtube api and learned that <yt:accessControl> or <yt:state> tags can be used for checking this.

    I went to the below url to get the feed for this particular video with video id CQzUsTFqtW0 but i could not find <yt:accessControl> or <yt:state> tags.
    http://gdata.youtube.com/feeds/api/videos/CQzUsTFqtW0

    Anybody have any idea where i can find the xml feed with <yt:accessControl> or <yt:state> tags using Video Id so that I can use php xml parse for my job.
     
    parallelsruler, Oct 9, 2010 IP
  2. Crirus

    Crirus Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I am digging the same idea, three hours on google, nothing to really make sense... if you find anything, please post here

    maybe you should make sure it's restricted, they may not add info for public videos.



    thanks
     
    Crirus, Oct 9, 2010 IP
  3. JoelLarson

    JoelLarson Peon

    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    http://gdata.youtube.com/feeds/api/videos/CQzUsTFqtW0?v=2
    Code (markup):
    http://gdata.youtube.com/feeds/api/videos/(VIDEO_ID)?v=2
    Code (markup):
    This may be of use as well:
    http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html
    Code (markup):
    Hoping this is what you were looking for :)
     
    JoelLarson, Oct 9, 2010 IP
  4. Crirus

    Crirus Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    actually I was looking for

    $videoEntry->isEmbeddable() and $videoEntry->isPrivate() - Zend framework



    Regards,
    Crirus
     
    Crirus, Oct 9, 2010 IP
  5. parallelsruler

    parallelsruler Peon

    Messages:
    80
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi JoelLarson,

    This seems to be helpful for me. I assume that we will get the <yt:accessControl> tag only if we add the parameter 'v=2' (version i suppose) in the url.

    Thanks a lot for your help.
     
    parallelsruler, Oct 9, 2010 IP