I've created my crawler using file_get_contents
function but when I crawl some sites I'm getting this character: � when I should get this: é. Some ideas of what is happening?
This is for a windows vps server running php.
I've already tried:
But all these things didn't work.
PD: My file where I'm running this code is on UTF8.
$url = "https://play.google.com/books/reader?id=4rqYDwAAQBAJ&hl=en_US";
$options = array('http'=>array('method'=>"GET", 'header'=>"Accept-language: en-US,en;q=0.8\r\n" ."Accept-Charset: UTF-8, *;q=0"));
$context = stream_context_create($options)
$profile = file_get_contents($url,false,$context);
echo $profile
I'm expecting to get accented characters and not this diamond character �.