| 1 |
<?php // -*-php-*- |
<?php // -*-php-*- |
| 2 |
/* $Id: fooaggregator.module,v 1.4.2.5 2007/11/23 19:51:19 alaa Exp $ */ |
/* $Id: fooaggregator.module,v 1.4.2.6 2007/11/24 00:35:54 alaa Exp $ */ |
| 3 |
|
|
| 4 |
require_once('fooaggregator_feed.inc'); |
require_once('fooaggregator_feed.inc'); |
| 5 |
require_once('fooaggregator_item.inc'); |
require_once('fooaggregator_item.inc'); |
| 8 |
// todo: |
// todo: |
| 9 |
// don't update checked if the feed fails. |
// don't update checked if the feed fails. |
| 10 |
// set up a custom user agent ;-) |
// set up a custom user agent ;-) |
|
// update items if the feed has updated ones ? |
|
| 11 |
// a way to set the defaults (admin -> content type -> aggregator feed) |
// a way to set the defaults (admin -> content type -> aggregator feed) |
|
// a way to support libcurl. |
|
| 12 |
// import/export: opml or CSV |
// import/export: opml or CSV |
| 13 |
// cron should process published nodes only. And unpublish them if there's an error. |
// cron should process published nodes only. And unpublish them if there's an error. |
| 14 |
|
|
| 487 |
|
|
| 488 |
$ch = curl_init(); |
$ch = curl_init(); |
| 489 |
|
|
|
curl_setopt($ch, CURLOPT_USERAGENT, "User-Agent: Drupal (+http://drupal.org/)"); |
|
| 490 |
curl_setopt($ch, CURLOPT_HTTPHEADER, $defaults); |
curl_setopt($ch, CURLOPT_HTTPHEADER, $defaults); |
| 491 |
|
|
| 492 |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |