<?php
class com56
{
	private $curl = null;
	private $mid = 0;
	private $url = '';
	private $html = '';
	private $total = 0;
	private $specialid = 0;

	function com56($url, $mid)
	{
		$this->curl = qbase::get_object('curl');
		$this->url = $url;
		$this->mid = $mid;
	}

	function get(){
		$data = array();
		if(preg_match("/\/v_(.*?)\.html/", $this->url, $match)){
			//µ¥¸öÃ½ÌåÒ³Ãæ
			$html = qbase::load($this->url);
			$name = $this->charsetLocal(trim($this->curl->cut($html, "<h1>", "<span id=\"mobile\">")));
			$data[] = array($name, $match[1]);
		}else if(preg_match("/_vid\-(.*?)\.html/", $this->url, $match)){
			$html = qbase::load($this->url);
			$name = $this->charsetLocal(trim($this->curl->cut($html, "'Subject' : '", "', 'Content'")));
			$data[] = array($name, $match[1]);
		}else if(preg_match("/album\-aid\-([0-9]{1,9})/", $this->url, $match)){

		}
		return $data;
	}

	function charsetLocal($s){
		global $_SET;
		return qbase::iconvs($s, $_SET['def_charset'], 'utf-8');
	}

	function linkToUrl($code){
		return $code;
	}
}
?>