Solved

Php script to extract data from another web page

Posted on 2010-11-11
2
760 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

840 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