这是我的proxy.php
文件:
$url = urldecode($_GET['url']);
$url = 'http://' . str_replace('http://', '', $url);
echo file_get_contents($url);
这是我的reader.js
文件:
var site = 'http://wanteddomain.com/index.aspx?lang=34&team1=0&team2=0&next_turn=1'
var url = 'http://localhost/mydomain.pl/admin/proxy.php?url=' + encodeURIComponent(site)
$.ajax({
url : url,
type : 'GET',
contentType: "text/html;charset=utf-8",
dataType : 'html'
}).done(function(res) {
//when I access special dom element, I have for example æ³°æå°å¡ instead of 广告
});
怎么做汉字?