How to fetch chinese words in a text file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
brianbuffett
Forum Newbie
Posts: 3
Joined: Thu Nov 02, 2006 11:18 pm

How to fetch chinese words in a text file

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
brianbuffett
Forum Newbie
Posts: 3
Joined: Thu Nov 02, 2006 11:18 pm

Post 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
Post Reply