Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

QueryPath Parse Live Page VS Download

Posted on 2012-08-17
4
Medium Priority
?
901 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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 …
Suggested Courses

876 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