Location: PHPKode > scripts > YouTube Video API > comments.class.php
<?php
class comments extends google_data
{
	public $comments = null;

	function __construct($feed_url)
	{
		$this->load($feed_url);
	}
	
	public function load($url)
	{
		unset($this->comments);
		$xpath 		= $this->read($url);
		$comments 	= $xpath->query("//atom:entry");
		if ($comments)
		{
			$this->comments = array();
			foreach ($comments as $comment)
			{
				array_push($this->comments, new comment($xpath, $comment));
			}
		}
	}
}
?>
Return current item: YouTube Video API