Well, i'm trying to get the HTML from a certain web page. This web page has UTF-8 characters in its URL and PHP is giving me this error:
Warning: file_get_contents(http://enem.descomplica.com.br/gabarito/enem/2015/dia-1-2a-aplicacao/questoes/dubai-é-uma-cidade-estado-planejada-para/): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\xampp2\htdocs\test\index.php on line 102
Line 102 is:
if($content = file_get_contents($this->link)){
I'm convinced that the problem is actually with the 'é' in the URL because when I try to use this function with an URL that does not contain UTF8 chars in it, it works.
More specifically, the URL without UTF-8 chars that worked is:
Does anyone know what can I do?
Thanks in advance!