Pulling in YouTube Videos from Specific Channel
<p>I'm trying to pull all videos from a specific youtube channel.</p>

<p>I'm getting this error:</p>

<pre><code>Fatal error: Call to undefined function getYTid() in C:\inetpub\wwwroot\ped.php on line 71
</code></pre>

<p>Any suggestions?</p>

<pre><code>class ChannelFeed {

    function __construct($username){
        $this-&gt;username=$username;
        echo $this-&gt;username;
        $this-&gt;feedUrl=$url='http://gdata.youtube.com/feeds/api/users/'.$username.'/uploads?orderby=updated';
        $this-&gt;feed=simplexml_load_file($url);
    }

    public function getYTid() {

        $ytURL = $this-&gt;feed-&gt;entry-&gt;link['href'];

        $ytvIDlen = 11; // This is the length of YouTube's video IDs

        // The ID string starts after "v=", which is usually right after 
        // "youtube.com/watch?" in the URL
        $idStarts = strpos($ytURL, "?v=");

        // In case the "v=" is NOT right after the "?" (not likely, but I like to keep my 
        // bases covered), it will be after an "&amp;":
        if($idStarts === FALSE)
        $idStarts = strpos($ytURL, "&amp;v=");
        // If still FALSE, URL doesn't have a vid ID
        if($idStarts === FALSE)
        die("YouTube video ID not found. Please double-check your URL.");

        // Offset the start location to match the beginning of the ID string
        $idStarts +=3;

        // Get the ID string and return it
        $ytvID = substr($ytURL, $idStarts, $ytvIDlen);    
        return $ytvID;   
    }

public function showFullFeed(){ 
$vidarray = array();
    foreach($this-&gt;feed-&gt;entry as $video){
        $vidarray[] = $video-&gt;link['href'];
    }
    return $vidarray ;
}


 };
$youtube = new ChannelFeed('channel_name');
$vids = $youtube-&gt;showFullFeed();
$vidIDs = array_map(getYTid(),$vids);
</code></pre>
