Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

QueryPath Parse Live Page VS Download

Posted on 2012-08-17
4
Medium Priority
?
889 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
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 customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

598 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