Hello I just start to develop php what I want to do is to get xml contents from another site but when i get it like this
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web page
CURLOPT_HEADER => false, // don't return headers
CURLOPT_ENCODING => "UTF-8", // handle compressed
CURLOPT_USERAGENT => "spider", // who am i
);
$ch = curl_init("http://wxxx.xml");
curl_setopt_array( $ch, $options );
$file = curl_exec( $ch );
curl_close( $ch );
it returns corrupted characters I can make it look like ok when I change header of page to UTF-8 but the problem is that I cannot insert these variables to database they are corrupted there too, How can I fix this? thank you for any answer.