Created
September 9, 2014 19:20
-
-
Save khoand0000/2079772f448618715d0b to your computer and use it in GitHub Desktop.
How to use phpQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* User: videde | |
* Date: 8/21/13 | |
* Time: 1:41 AM | |
*/ | |
require('phpQuery/phpQuery.php'); | |
function action() { | |
$content = ""; // content of web page | |
$doc = phpQuery::newDocument($content); | |
$as = pq('a.rg_l'); | |
foreach($as as $a) { | |
$href = pq($a)->attr('href'); | |
$divs = pq('div', $a); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment