Link to home
Start Free TrialLog in
Avatar of phantem
phantem

asked on

Using PHP for web clipping

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?
Avatar of KarveR
KarveR

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.
Avatar of phantem

ASKER

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
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 :-)
Avatar of phantem

ASKER

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
current buglist...
http://bugs.php.net/bug.php?id=18180 , doesn't look like its too well solved at the moment

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
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial