V
V
Vollanddzaft2019-01-09 17:10:21
Parsing
Vollanddzaft, 2019-01-09 17:10:21

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>";
?>

Gives out such
characters

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question