src/Net/Site/Crawler.php
protected function getHTML( $url )
	{
		$this->reader->setUrl( $url );
		try
		{
			$content	= $this->reader->read( array(
				'CURLOPT_FOLLOWLOCATION'	=> TRUE,
				'CURLOPT_COOKIEJAR'			=> 'cookies.txt', 
				'CURLOPT_COOKIEFILE'		=> 'cookies.txt'
			) );
			$contentType	= $this->reader->getInfo( 'content_type' );
			return $contentType === 'text/html' ? $content : '';
		}
		catch( RuntimeException $e )
		{
			$this->errors[$url]	= $e->getMessage();
			throw $e;
		}
	}
protected function getHTML( $url )
	{
		$this->reader->setUrl( $url );
		try
		{
			$content	= $this->reader->read( array(
				'CURLOPT_FOLLOWLOCATION'	=> TRUE,
				'CURLOPT_COOKIEJAR'			=> 'cookies.txt', 
				'CURLOPT_COOKIEFILE'		=> 'cookies.txt'
			) );
			$contentType	= $this->reader->getInfo( 'content_type' );
			return $contentType === 'text/html' ? $content : '';
		}
		catch( RuntimeException $e )
		{
			$this->errors[$url]	= $e->getMessage();
			throw $e;
		}
	}
protected function getHTML ( $ url ) { $ this -> reader -> setUrl ( $ url ) ; try { $ content = $ this -> reader -> read ( array ( 'CURLOPT_FOLLOWLOCATION' => TRUE , 'CURLOPT_COOKIEJAR' => 'cookies.txt' , 'CURLOPT_COOKIEFILE' => 'cookies.txt' ) ) ; $ contentType = $ this -> reader -> getInfo ( 'content_type' ) ; return $ contentType === 'text/html' ? $ content : '' ; } catch ( RuntimeException $ e ) { $ this -> errors [ $ url ] = $ e -> getMessage ( ) ; throw $ e ; } }
Reads HTML Page and returns Content or logs Errors and throws Exception.
@access		public
@param		string		$url		URL to get Content for
@return		string
Reads HTML Page and returns Content or logs Errors and throws Exception .