Solved

Php script to extract data from another web page

Posted on 2010-11-11
2
756 Views
Last Modified: 2012-05-10
Hi
Can anyone help?  I am trying to find out if I can add a php script to a webpage so it displays content from a html table generated in another web page. The url is http://95.131.66.2/~webtestc/template.php. The data is at http://95.131.66.2/~webtestc/stats/ These stats are created through a MS Access database on my local PC and uploaded to the web. So if anyone has an idea how to achieve this that would be great. ta
Bud    
0
Comment
Question by:bud144
2 Comments
 
LVL 6

Accepted Solution

by:
CyberGhost earned 300 total points
ID: 34110854
Hi,

I have used phpquery successfully before to work with HTML data in a simmilar way to jQuery, so I'd go that way. However, it might be a bit complicated for you if you're not familiar with jQuery at all.

Have a look here: http://code.google.com/p/phpquery/

To get the HTML page, you can use cURL in PHP before processing with phpquery.
0
 
LVL 5

Assisted Solution

by:wmadrid1
wmadrid1 earned 200 total points
ID: 34123400
If you just want to show the full content of
http://95.131.66.2/~webtestc/stats/
try this:

<?
echo file_get_contents("http://95.131.66.2/~webtestc/stats/");
?>

If you want to show, just the table, you must keep it in a string and work whit it
<?
$table =  file_get_contents("http://95.131.66.2/~webtestc/stats/");
//work with $table to extract the needed table
?>
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
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 embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now