I have this code:
<?php
@$html = file_get_contents($urlFlujo);
echo $urlFlujo;
var_dump($html);
$lectorHtml = new DOMDocument();
@$lectorHtml->loadHTML($html);
?>
The problem is that when it comes to a url shortened with ow.ly
for example, which then redirects to a web with https
, the function file_get_contents
returns false
.
Is there a solution to this error?