Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6918477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:51:51+00:00 2026-05-27T09:51:51+00:00

YouTube: get youtube title+ image+description like facebook Right now i’m using <?php // Replace

  • 0

YouTube: get youtube title+ image+description like facebook

Right now i’m using

<?php

// Replace Youtube URLs with embed code
function embedYoutube($text)
{
$search = '%          # Match any youtube URL in the wild.
    (?:https?://)?    # Optional scheme. Either http or https
    (?:www\.)?        # Optional www subdomain
    (?:               # Group host alternatives
      youtu\.be/      # Either youtu.be,
    | youtube\.com    # or youtube.com
      (?:             # Group path alternatives
        /embed/       # Either /embed/
      | /v/           # or /v/
      | /watch\?v=    # or /watch\?v=
      )               # End path alternatives.
    )                 # End host alternatives.
    ([\w\-]{10,12})   # Allow 10-12 for 11 char youtube id.
    \b                # Anchor end to word boundary.
    %x';

$replace = '<object width="425" height="344">
    <param name="movie" value="http://www.youtube.com/v/$1?fs=1"</param>
    <param name="allowFullScreen" value="true"></param>
    <param name="allowScriptAccess" value="always"></param>
    <embed src="http://www.youtube.com/v/$1?fs=1"
        type="application/x-shockwave-flash" allowscriptaccess="always" allowFullScreen="true" width="425" height="344">
    </embed>
    </object>';

return preg_replace($search, $replace, $text);
}

$string = 'Video1'.
'http://www.youtube.com/watch?v=NLqAF9hrVbY'."\n".
'http://www.youtube.com/v/u1zgFlCw8Aw';

echo embedYoutube($string);

?>

for embedding youtube videos but i want full description + title + link of the source for the video to be displayed along with it.
Does anyone have any answer.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T09:51:52+00:00Added an answer on May 27, 2026 at 9:51 am

    Might be a little pain in the ass, but you could use the Youtube feed api. This is a cutout from my own code:

    $youtube = simplexml_load_file('http://gdata.youtube.com/feeds/api/videos/'.$youtubeID.'?v=2');
    $title ='<b>Youtube:</b> '. (string) $youtube->title;
    

    Should do it. The loading is also pretty fast.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

so i continue from this question YouTube: get youtube title+ image+description like facebook `
YouTube has URL's like these: http://www.youtube.com/watch?v=zKqeCtjFGFc When I create a PHP page mine would
Like the youtube embed text fields. How do you make a text field selectable
The jQuery - $.ajax({ type: GET, url: add_showcase.php, data: title= + document.getElementById(title_in).value + &desc=
I'm using some regexes to parse wiki-styled text. <?php function wikiParser($data){ $data = preg_replace('/\[\[Youtube:([a-zA-Z0-9_]+)\]\]/',
What is the easiest way to get the title from the youtybe video ,
I'm trying to get the youtube as3 chromeless player to work. I have followed
I'm trying to get the video data from this youtube playlist feed and add
i want to get all the details of youtube,so if the user tick the
It looks like the YouTube API does not have a way to stop a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.