I want to take the current page as html argument :

    <?php
    $html_obj = new simple_html_dom();

        // Load HTML from a string
        $html_obj->load($currentpageviewedbyloggedinuser);
?>

How can I do that?

Comments

Konstantin Komelin’s picture

Issue summary: View changes
Status: Active » Fixed

Try this snippet:

$url = url(request_path(), array('absolute' => TRUE));
$html_obj = file_get_html($url);

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.