The following code results in: “ERROR: The request could not be satisfied”.
require_once ('simple_html_dom.php');
$url="https://www.ontario.ca/page/2024-ontario-immigrant-nominee-program-updates";
//$url="https://www.google.com/";
$base = $url;
$curl = curl_init();
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_URL, $base);
curl_setopt($curl, CURLOPT_REFERER, $base);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
//curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; rv:2.2) Gecko/20110201');
$str = curl_exec($curl);
curl_close($curl);
$html = new simple_html_dom();
$html->load($str);
var_dump($html);
However, it does not have problems loading google.com.