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

x
?
Solved

Php script to extract data from another web page

Posted on 2010-11-11
2
Medium Priority
?
772 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 1200 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 800 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 Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
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…

972 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