Solved

Php script to extract data from another web page

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

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

615 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