Page 1 of 1

How to fetch chinese words in a text file

Posted: Thu Nov 02, 2006 11:33 pm
by brianbuffett
Hello all,

Now I wanna get links' address from a webpage such as researching result from google search engine. In order to get the addresses, I convert the page to HTML Code. Then, based on the pattern of the searching result in the codes, i am trying to get address, but i encountered problems.

1) The file with HTML codes has english words, chinese words and so on. How do I search a chinese word by php. Are there any classes for me to solve the problem.

2) When I use fgetc() function for a long time, there is an error prompted to me. Is it time limitation for use of the function? How to solve it?

Please help me!!

thanks,
Brian

Posted: Fri Nov 03, 2006 1:09 pm
by feyd
  1. strpos()
  2. What error? PHP has a built in timer for the entire script to finish. If that limit is exceeded, PHP will halt processing. There are ways of adjusting the amount of time PHP will give you, but it is often better to build the application such that it doesn't come close to exceeding that limit in the first place.

Posted: Sun Nov 05, 2006 9:38 pm
by brianbuffett
hi feyd,

thank you. let me try to test it by using strpos(). I don't remember what the error is called but it prompt me that execute the programming excess a period of time as 1 min.

regards,
Brian