Answer the question
In order to leave comments, you need to log in
Who can help with Parser?
Help to deal with the parser. here is the code:
<?php
require_once 'curl/curl.php';
require_once 'phpquery/phpQuery/phpQuery.php';
$curl = new Curl();
$response = $curl->get( урл сайта');
$doc= phpQuery::newDocument($response->body);
$product=$doc->find('.product');
echo "<table>";
foreach ($product as $product){
$pq= pq($product);
echo "<tr><td>". $pq->find('.jshop_code_prod span')->text() .'</td>' ;
echo "<td>". $pq->find('.name h3 a ')->text() .'</td> ';
echo "<td>". $pq->find('.jshop_price span')->text() .'</td> ';
echo "</tr>";
}
echo "</table>";
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question