public function loadUrl($url, $curl = false) {
        if ($curl) {
            $content = self::loadContent($url);
            if (empty($content)) {
                throw new Exception("Can't get content from " . $url);
            }
            $this->loadString($content);
        } else {
            $this->load_file($url);
        }
    }
public function loadUrl($url, $curl = false) {
        if ($curl) {
            $content = self::loadContent($url);
            if (empty($content)) {
                throw new Exception("Can't get content from " . $url);
            }
            $this->loadString($content);
        } else {
            $this->load_file($url);
        }
    }
public function loadUrl ( $ url , $ curl = false ) { if ( $ curl ) { $ content = self :: loadContent ( $ url ) ; if ( empty ( $ content ) ) { throw new Exception ( "Can't get content from " . $ url ) ; } $ this -> loadString ( $ content ) ; } else { $ this -> load_file ( $ url ) ; } }
Inits HtmlDomParser with HTML content by URL.

@param string $url URL of the page.
@param boolean $curl Use CURL to load content or file_get_contents($url)
method.

@throws Exception If content loading error occurred.
Inits HtmlDomParser with HTML content by URL .