summaryrefslogtreecommitdiffstats
path: root/cron.php
diff options
context:
space:
mode:
authorMaurice Svay <maurice@svay.com>2010-02-16 15:23:41 +0000
committerMaurice Svay <maurice@svay.com>2010-02-16 15:23:41 +0000
commitec4326e4bab52c558d1f2564ab2fa0545f81b071 (patch)
tree2c7b9d1bd5a1ee72be2e40e4b45895877777aefe /cron.php
downloadplanet-ec4326e4bab52c558d1f2564ab2fa0545f81b071.tar
planet-ec4326e4bab52c558d1f2564ab2fa0545f81b071.tar.gz
planet-ec4326e4bab52c558d1f2564ab2fa0545f81b071.tar.bz2
planet-ec4326e4bab52c558d1f2564ab2fa0545f81b071.tar.xz
planet-ec4326e4bab52c558d1f2564ab2fa0545f81b071.zip
Initial commit
Diffstat (limited to 'cron.php')
-rw-r--r--cron.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/cron.php b/cron.php
new file mode 100644
index 0000000..6ff46ae
--- /dev/null
+++ b/cron.php
@@ -0,0 +1,22 @@
+<?php
+include_once(dirname(__FILE__).'/app/classes/Planet.class.php');
+include_once(dirname(__FILE__).'/app/lib/Cache.php');
+include_once(dirname(__FILE__).'/app/lib/lib.http.php');
+
+//Load configuration
+if (is_file(dirname(__FILE__).'/custom/config.yml')){
+ $conf = Spyc::YAMLLoad(dirname(__FILE__).'/custom/config.yml');
+ $PlanetConfig = new PlanetConfig($conf);
+} else {
+ die('Config file (custom/config.yml) is missing.');
+}
+
+//Instantiate app
+$Planet = new Planet($PlanetConfig);
+
+//Load OPML
+if (0 < $Planet->loadOpml(dirname(__FILE__).'/custom/people.opml')) {
+ $Planet->download(1.0);
+}
+
+var_dump($Planet->errors);