[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

QueryPath Parse Live Page VS Download

Posted on 2012-08-17
4
Medium Priority
?
932 Views
Last Modified: 2012-08-17
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?
0
Comment
Question by:kjenney
  • 3
4 Comments
 
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 38306568
does querypath do a file_get_contents first? if not, you could try that, and then parse the result.
0
 
LVL 25

Accepted Solution

by:
Kyle Hamilton earned 2000 total points
ID: 38306591
$url = 'http://google.com";

$htmlDoc = file_get_contents($url);

$body = htmlqp($htmlDoc, 'body');
0
 
LVL 1

Author Closing Comment

by:kjenney
ID: 38306649
Works great! Saves me a lot of time and coding. Thanks.
0
 
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 38306667
:))
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
This article discusses how to implement server side field validation and display customized error messages to the client.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question