Answer the question
In order to leave comments, you need to log in
Why can't phpQuery find links on a page?
<?php
require_once 'phpQuery/phpQuery-onefile.php';
$url = "http://www.splav-kharkov.com/main.php";
$response = file_get_contents($url);
$pq = phpQuery::newDocument($response);
$urls = $pq->find('a');
foreach ($urls as $url) {
$pq_url = pq($url);
$url = $pq_url->html();
echo $url.'<br />';
}
?>
Answer the question
In order to leave comments, you need to log in
Invalid HTML on the patient's site.
Links are posted like this:<b><a href='about_program.php'>text</b></a>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question