1
我想用PHP報廢以下網址: http://www.clubedoricardo.com.br/Produto/Smartphone-Samsung-Galaxy-Win-2-Duos-G360-Cinza-Dual-Chip-4G-Tela-45-Camera-5MP-Frontal-2MP-Quad-Core-12Ghz-8GB/44-491-496-568187刮痧HTML與PHP和編碼問題
$url="http://www.clubedoricardo.com.br/Produto/Smartphone-Samsung-Galaxy-Win-2-Duos-G360-Cinza-Dual-Chip-4G-Tela-45-Camera-5MP-Frontal-2MP-Quad-Core-12Ghz-8GB/44-491-496-568187";
$dom = new DOMDocument;
$dom->loadHTMLFile($url);
$page_content = $dom->saveHTML();
echo($page_content);
但文字帶有奇怪的字符。我試着用UTF-8和ISO-8859編碼,但沒有任何變化。
任何想法?
對不起,我現在修復了網址。我應該嘗試「loadHTML」還是「loadHTMLFile」? – Cleuson