When i use the following code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://example.rss.net/feed/');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
$xml = new SimpleXMLElement($data);
foreach($xml->channel->item as $post) {
echo $post->title;
}
and echo the posts, unrecognized characters are showed like this ÅŸi, Ä, Ã.
The feed i try to read contains Latin characters and i need a way to display them correctly.
Take a look at this FAQ about charsets: http://kore-nordmann.de/blog/php_charset_encoding_FAQ.html
You will find your answer and learn a lot 🙂