I already checked older threads and there's no null value in my object.
Here in below code I am getting correctly page source in $html. And i checked that there is correct class names. This script was already working fine.
Now it gives error: Call to member function find() on a non-object
function getParameter($url)
{
$root = new stdClass();
$items = array();
$items = array();
$aContext = array(
'http' => array(
'proxy' => 'tcp://182.253.50.238:8080', // This needs to be the server and the port of the Proxy Server.
'request_fulluri' => true,
),
);
$cxContext = stream_context_create($aContext);
$html = file_get_contents($url, false, $cxContext);
echo $html;
//$html = file_get_html($url);
if($html)
{
$containers1 = $html->find('div.mapbox div.mapbox-text strong.street-address address'); //Gives error in this line
}
}