2
我正在寻找任何(php)phpQuery替代品,它也模仿网络浏览器的行为(如phpQuery的WebBrowser插件)。我喜欢phpQuery,但它最后更新于2009年5月。 有什么建议吗?是否有任何PHPQuery与WebBrowser插件的替代品?
我正在寻找任何(php)phpQuery替代品,它也模仿网络浏览器的行为(如phpQuery的WebBrowser插件)。我喜欢phpQuery,但它最后更新于2009年5月。 有什么建议吗?是否有任何PHPQuery与WebBrowser插件的替代品?
你可以试试PHP简单的HTML DOM解析器。
这些例子来自在线手册http://simplehtmldom.sourceforge.net/manual.htm
$ret = $html->find('#foo');
// Find all element which class=foo
$ret = $html->find('.foo');
// Find all anchors and images
$ret = $html->find('a, img');
// Find all anchors and images with the "title" attribute
$ret = $html->find('a[title], img[title]');
现在最流行的一个天https://github.com/FriendsOfPHP/Goutte – PayteR 2017-07-31 20:07:35