0

Possible Duplicate:
how to convert ISO 8859-1 Characters to UTF-8

i would like to get the HTML content of this uRL: http://www.20minutos.es/noticia/1635461/0/aforo/madrid-arena/vigilantes/

But there are missing characters (like 'ñ' or 'á', 'é'...)

The code to get the HTML is

$html = file_get_contents_utf8($url);

and then:

$html = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8");

I've tried a few alternatives but still not working.

Any ideas? Thanks

Community
  • 1
  • 1

1 Answers1

0

I am not sure what encoding you are trying to convert to, but using file_get_contents() should do what you are trying to do.

Change your code as follows

<?php
 $url = 'http://www.20minutos.es/noticia/1635461/0/aforo/madrid-arena/vigilantes/';
 $html = file_get_contents($url);
 echo $html;
?>

I tested this and it shows all the characters (like 'ñ' or 'á', 'é'...) you were referring to.