1
내 코드는 여기에 다른 문제와 다르다. 문제는 필자가 성공적으로 페이지를 말리기 만하면되지만 문자는 모두 인식 할 수 없다는 것을 알게된다. 예. " Ƶ ̳̣ 2012 棩", 어떻게 그들을 정상적으로 보이게 만드시겠습니까?이 페이지를 말리면서 인식 할 수없는 문자를 해결하는 방법
$cookie_file = tempnam('./temp','cookie');
$login_url = 'http://bbs.php100.com/login.php';
$post_fields = 'cktime=3600&step=2&pwuser=username&pwpwd=password';
$ch = curl_init($login_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_exec($ch);
curl_close($ch);
$url = 'http://bbs.php100.com/index.php';//or specific page
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
$contents = curl_exec($ch);
//preg_match("",$contents,$arr);
//echo $arr[1];
curl_close($ch);
이 문자는 어떻게 보입니까? 커맨드 라인에 표시하거나 페이지에 표시 하시겠습니까? 출력하기 전에 텍스트를 어떻게 수정합니까? – Timur
이것은 내 모든 코드이며 웹 브라우저 (firefox)에서이 문자를 볼 수 있습니다. – Phoenix