Do you have a question? Post it now! No Registration Necessary. Now with pictures!
June 25, 2007, 7:58 am
rate this thread
I am trying to read in a url which is encoded in GB2312 (http://
top.baidu.com/winkvane.html). I have tried other pages with this
encoding and each time I get a connection time out error. It seems
that fopen cannot open a webpage in GB2312. Is there a way around
this? Has anyone else had this sort of problem?
Here is an example with some simple code (using PHP5):
$file = fopen("http://top.baidu.com/winkvane.html ", "r") or
exit("Unable to open file!");
echo fgets($file). "<br />";
Any ideas would be greatly appreciated! Thank you.