RE: [PHP-GENERAL] grabbing articles off other sites?
| From: | Webmaster | Date: | Thu, 01 Jun 2000 14:14:20 +0000 |
| Subject: | RE: [PHP-GENERAL] grabbing articles off other sites? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-794@lists.php.net to get a copy of this message | ||
Hola,
Check this tip from zend.com
http://www.zend.com/tips/tips.php?id=34&single=1
Hope it helps.
Eduardo Jordán G.
Webmaster
-----Original Message-----
From: Chris Moyer [SMTP:cmoyer@chekinc.com]
Sent: Wednesday, May 31, 2000 3:21 PM
To: Chris Sano
Cc: php-general@lists.php.net
Subject: Re: [PHP-GENERAL] grabbing articles off other sites?
On Wed, May 31, 2000 at 05:15:57PM -0400, Chris Sano wrote:
> I am trying to develop a portal for Philadelphia Flyer fans where tehy will
> be able to get articles from any site they wish to right on their portal
> page. Is it possible to do a search with PHP, for example, of the NHL page
> on the ESPN site to find any matching keywords, if so, extract the link
> title and the URL and put it in a mysql table?
>
> For example, if there was an article "Lindros signs $8.7 million deal with
> Flyers", and that matched the keyword "Lindros" and "Flyers", can PHP
> extract the title of the article and the URL?
>
Short Answer: Yes
Long Answer: PHP doesn't have a function grap_espn_headlines(). :) You're
going to have to use the file commands to load the target html file into a
variable. Then you will have to use the string, or ereg functions to find
the information from the page that you want, and display it.
It probably makes senses to do this fetching and parseing infrequently
and cache the results on your server...
ALSO: You should probably get ESPN's permission if you are going to be
serving up any of their content.
-- Chris Moyer -- cmoyer@chekinc.com --
PHP Developer -- Chek.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net