php|architect's Guide to Web Scraping with PHP - Wind Business ...
php|architect's Guide to Web Scraping with PHP - Wind Business ...
php|architect's Guide to Web Scraping with PHP - Wind Business ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
CSS Selec<strong>to</strong>r Libraries ” 139<br />
It’s also worth noting that Zend_Dom_Query offers no retrieval functionality. All<br />
methods for introducing documents in<strong>to</strong> it require that those documents be in string<br />
form beforehand. If you are already using Zend Framework, a readily available option<br />
for retrieval is Zend_Http_Client, which is also discussed in this book.<br />
Documentation for Zend_Dom_Query can be found at<br />
http://framework.zend.com/manual/en/zend.dom.query.html. At this<br />
time, there is no officially supported method of downloading only the<br />
Zend_Dom package. The entire framework can be downloaded from<br />
http://framework.zend.com/download/current/ and the direc<strong>to</strong>ry for the Zend_Dom<br />
package can be extracted from it. An unofficial method of downloading individual<br />
packages can be found at http://epic.codeu<strong>to</strong>pia.net/pack/. Zend Framework<br />
components are licensed under the N e w BSD License.<br />
phpQuery<br />
phpQuery is heavily influenced by jQuery and maintains similarity <strong>to</strong> it insofar<br />
as its runtime environment being the server (as opposed <strong>to</strong> the client) will allow.<br />
It requires <strong>PHP</strong> 5.2 and the DOM extension as well as the Zend_Http_Client and<br />
Zend_Json components from Zend Framework, which are bundled but can be substituted<br />
<strong>with</strong> the same components from a local Zend Framework installation.<br />
CSS support is limited <strong>to</strong> a subset of CSS3. M o s t jQuery features are supported<br />
including plugin support, <strong>with</strong> porting of multiple jQuery plugins being planned.<br />
Other components include a CLI utility that makes functionality from the phpQuery<br />
library available from command line and a server component for integrating <strong>with</strong><br />
jQuery via calls made from it on the client side. Retrieval support is included in the<br />
form of integration <strong>with</strong> Zend_Http_Client.<br />
Documentation and download links are available from<br />
http://code.google.com/p/phpquery/. It is licensed under the MIT License.<br />
DOMQuery<br />
This library is actually a project of my o w n . While still in alpha at the time of this<br />
writing, it is fairly functional and includes a full unit test suite. Like some of the<br />
other libraries mentioned in this chapter, it requires <strong>PHP</strong> 5 and makes heavy use of<br />
the DOM extension.