Below is the function to get the html contents in simple html dom
function file_get_html($url, $use_include_path = false, $context=null, $offset = -1, $maxLen=-1, $lowercase = true, $forceTagsClosed=true, $target_charset = DEFAULT_TARGET_CHARSET, $stripRN=true, $defaultBRText=DEFAULT_BR_TEXT)
{
// We DO force the tags to be terminated.
$dom = new simple_html_dom(null, $lowercase, $forceTagsClosed, $target_charset, $defaultBRText);
// For sourceforge users: uncomment the next line and comment the retreive_url_contents line 2 lines down if it is not already done.
$contents = file_get_contents($url, $use_include_path, $context, $offset);
// Paperg - use our own mechanism for getting the contents as we want to control the timeout.
// $contents = retrieve_url_contents($url);
if (empty($contents))
{
return false;
}
// The second parameter can force the selectors to all be lowercase.
$dom->load($contents, $lowercase, $stripRN);
return $dom;
}
and 70th line in the file is
$contents = file_get_contents($url, $use_include_path, $context, $offset);
And when i set urlencode to the url location, it does throw this
Warning: file_get_contents(http%3A%2F%2Facereg%3Aacereg%40earms-app.cisco.com%2Fserver%2Fearms%3Fscreen%3Dcom.cisco.earms.ui.TestResult%26op%3DshowDetail%26selectedRequestId%3D200354385) [function.file-get-contents]: failed to open stream: No such file or directory in /var/www/html/reg_post/simple_html_dom.php on line 70
Fatal error: Call to a member function find() on a non-object in ....
I am sure urlencode is not going to solve this issue.