Video Picture Linking!

Discussion in 'PHP' started by machineman, Dec 26, 2011.

  1. machineman

    machineman New Member

    Joined:
    Aug 15, 2011
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    My blog is regularly updated with videos so the main page loading speed isn't very fast:
    vidstowatch.com

    I'm going to try and explain this as best i can: Basically instead of being able to play videos from the main page. I'd like to have just the image of the video (from Youtube, Metacafe, College Humor or any other video site i may use) on the main page that once selected re-directs the user to the page with the video on where they can play the video properly.

    Does that make sense and is it possible?

    Thank you
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Yes why not and where do you host your videos?
     
  3. ritsmontu

    ritsmontu New Member

    Joined:
    Dec 21, 2011
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Senior Consultant AT&T U-Verse
    Location:
    Chennai-India
    You can use the Youtube API Tools to get thumbnail images.
     
  4. ritsmontu

    ritsmontu New Member

    Joined:
    Dec 21, 2011
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Senior Consultant AT&T U-Verse
    Location:
    Chennai-India
    PHP:
    function print_video($id)
    {
    echo 
    "<a href='http://www.youtube.com/watch?v={$id}' target='_blank'>
    <img src='http://img.youtube.com/vi/
    {$id}/0.jpg' />
    </a>
    "
    ;
    }  

    Source: http://stackoverflow.com/questions/2068344/how-to-get-thumbnail-of-youtube-video-link-using-youtube-api
     
    Last edited: Dec 27, 2011

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice