QueryPath Parse Live Page VS Download

I'm using QueryPath to retrieve various tags from sites. I'm using htmlqp to parse pages. My problem is that the parse fails when done remotely but works fine when the page is saved locally via curl. How can I debug the output and get the pages to process?
LVL 1
kjenneyAsked:
Who is Participating?
 
Kyle HamiltonConnect With a Mentor Data ScientistCommented:
$url = 'http://google.com";

$htmlDoc = file_get_contents($url);

$body = htmlqp($htmlDoc, 'body');
0
 
Kyle HamiltonData ScientistCommented:
does querypath do a file_get_contents first? if not, you could try that, and then parse the result.
0
 
kjenneyAuthor Commented:
Works great! Saves me a lot of time and coding. Thanks.
0
 
Kyle HamiltonData ScientistCommented:
:))
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.