Answer the question
In order to leave comments, you need to log in
Can you help with PHPquery encoding?
Colleagues. Help...
<?php
require 'phpQuery.php';
$omaURL = file_get_contents('https://www.oma.by/catalog/');
$omaParse = phpQuery::newDocument($omaURL);
$hentry = $omaParse->find('.page-main');
echo $hentry;
require 'phpQuery.php';
$omaURL = file_get_contents('https://toster.ru/');
$omaParse = phpQuery::newDocument($omaURL);
echo $omaParse;
Answer the question
In order to leave comments, you need to log in
Try manually specifying the encoding in the second parameter:
This trick may also help:
$omaParse = phpQuery::newDocument('<meta charset="utf-8">' . $omaURL);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question