News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Developer Tutorials Blog:
Extracting text from Word Documents via PHP and COM
1 comment :: posted Wednesday March 26, 2008 @ 12:02:06
voice your opinion now!

In a recent blog post Akash Mehta showed how to reach into a Microsoft document (a Word file) and pull out the content inside via a PHP script.

Communicating via COM in PHP is easy as ever; especially for people coming from a VB background where executing complex tasks in MS-applications is a piece of cake, you will feel right at home in PHP. In fact, VB COM calls can be converted to PHP COM calls in just a few simple search and replaces.

He shows how to use the COM extension in a (Windows) PHP installation to access the text inside the document and manipulate the contents however you'd like (even writing them back out to another Word file).

tagged with: com document word extract content manipulate


Maarten Balliauw's Blog:
Indexing Word 2007 (docx) files with Zend_Search_Lucene
0 comments :: posted Tuesday February 05, 2008 @ 10:24:00
voice your opinion now!

Maarten Balliauw has written about a method he's developed to convince the Zend_Search_Lucene component of the Zend Framework to index the contents of a Word 2007 document.

Lucene basically is an indexing and search technology, providing an easy-to-use API to create any type of application that has to do with indexing and searching. If you provide the right methods to extract data from any type of document, Lucene can index it. [...] Sounds like a challenge!

He works through the three step process to getting the searching working, the key being his readDocXContents() function that goes through the Word file and returns all the text it can find. This is passed back out so the Zend Framework component can pull the data in and search (their example is on the string "Code Access Security").

You can grab the the full code here.

tagged with: zendframework zendsearchlucene word document download code


application PEAR book code PHP5 framework developer mysql cakephp pecl ajax database conference zend release zendframework job releases security package

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework