0
A
回答
1
看一看http://simplehtmldom.sourceforge.net/
然後做這樣的事情:
<?php
include_once('simplehtmldom/simple_html_dom.php');
$string = file_get_html('http://www.google.com')->plaintext;
$words = preg_split('/[\s,.]+/', $string, null, PREG_SPLIT_NO_EMPTY);
var_dump(array_unique($words));
?>
0
試試這個get_text 這個人會幫助你:http://mel.melaxis.com/devblog/2005/08/06/localizing-php-web-sites-using-gettext/
+0
你能舉個例子嗎?我現在不明白。 – Simon 2010-10-18 22:48:16
相關問題
- 1. Google Crawler Jquery URL
- 2. Maven/Java Crawler - StaleElementReferenceException
- 3. python asyncore或threadpool for web crawler?
- 4. 配置TYPO3 Crawler擴展
- 5. python Crawler中的錯誤
- 6. Solr使用Nutch Crawler索引
- 7. Storm-crawler和Elasticsearch版本
- 8. PHP中的word boundery
- 9. PHP word xml解析
- 10. 用php匹配word
- 11. PHP DOM Web Crawler打印「沒有」。沒有錯誤,沒有什麼
- 12. 對bot/crawler透明的php重定向方法?
- 13. PHP MS Word文件頁數
- 14. 使用PHP打開Microsoft Word
- 15. 在php中替換word var
- 16. Word shuffle算法(PHP或javascript)
- 17. 提高Crawler4j-Crawler效率,可伸縮性
- 18. 使用Storm Crawler進行爬網
- 19. nginx禁用gzip僅適用於facebook crawler
- 20. Symfony 2與Symfony \ Component \ DomCrawler \ Crawler測試xml
- 21. 在中間件中檢測Facebook Crawler
- 22. Abot Crawler - 如何檢測空值響應
- 23. Nutch crawler:只接受英文頁面
- 24. Sharepoint Crawler被拒絕訪問網站
- 25. nutch crawler相關網址問題
- 26. 節點.JS Crawler到JSON輸出爲空
- 27. Asp.net Crawler Web響應操作超時
- 28. Prestashop「加入購物車」由crawler訪問?
- 29. 使用PHP將Word文檔添加到另一個Word文檔
- 30. PHP preg_match_all:在其中找到帶有「@word」或「#word」的字符串
嗯,DOM - > DOM文檔 - >所有文本content/nodeValue內容 - >通過空格分解到數組 - >然後看到http://stackoverflow.com/questions/3933760/how-to-remove-all-instances-of-duplicated-values-from-an-array/3933852#3933852 ..有樂趣 – Hannes 2010-10-18 17:02:24