Using PHP for web clipping

phantem
phantem used Ask the Experts™
on
Is there a way to use PHP to grab the content from a web site, get rid of the crap, and display it for the user?

For example, say I wanted to have a PHP page which would go to slashdot, grab the first story title, and display it on a page...

How can this be done?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Check out if they have any news feeds (xml or whatever) and use that, its always nicer to ask and be rejected than to take what isn't rightfully yours.

Author

Commented:
That isn't actually what I want it for, but I figured it was a good example of the type of thing I'm trying to do.

Actually, what my goal is is to grab a table of numbers from a certain page at our vet hospital, and use jpgraph to create a line graph with the data (to show trends in lab values over time). My problem was that I couldn't figure out how to get the raw data...

I'm a relative newbie and was unaware of the abilities of fopen -- that it could grab a URL.

So, I guess I figured it out on my own. Thanks anyway.

Chris

Commented:
Heh :) the more info you post the easier it is to answer, if you get stuck on fopen, add some more in here I'm lurking around quite a lot with idle hands at the moment :-)
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Author

Commented:
Well, since you asked...

One problem that I'm having now is that the server that I'm trying to extract info from is using SSL. As I understand it, fopen supports SSL if you have compiled php_openssl.dll in ver 4.3 and above...
I just installed RC0 of 4.3.0RC1 on a windows box and got everything configured (except for openssl). When i uncomment the openssl extension and restart windows, it bitches at me that it can't find php_openssl.dll... It is in the same friggin place as php_gd.dll... why can't it see it and utilize it?

Any ideas? :)

just fyi, the site I'm trying to hit with fopen is https://vmacs.vmth.ucdavis.edu

Chris

Commented:
current buglist...
http://bugs.php.net/bug.php?id=18180 , doesn't look like its too well solved at the moment

Top Expert 2005

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation in the Cleanup topic area:

PAQ/Refund Points

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

snoyes_jw
EE Cleanup Volunteer
PAQed, with points refunded (100)

Computer101
E-E Admin

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial