Error returning page with Curl + PHP

0

I'm using cUrl + PHP to open an external site, but when I try to do this it loads normal but does not show the content I'm needing. In the Chrome console this error appears below and I imagine that is why:

Uncaught DOMException: Failed to set the 'domain' property on 'Document': 'siteexterno.com' is not a suffix of 'meudominio.com.br'.

Does anyone know how I can solve this? Remembering that I do not have access to the external site.

Code

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://br.sportingbet.com/esportes-futebol/brasil-s%C3%A9rie-a/1-102-190183.html');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1');
$html = curl_exec($ch);
curl_close($ch);

echo $html;

Update

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://br.sportingbet.com/esportes-futebol/brasil-s%C3%A9rie-a/1-102-190183.html');
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1');
curl_setopt($ch, CURLOPT_PROXY, '217.70.67.34'); 
    curl_setopt($ch, CURLOPT_PROXYPORT, '8080');
    curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$html = curl_exec($ch);
curl_close($ch);

echo $html;
    
asked by anonymous 22.08.2017 / 21:47

0 answers