Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

eznewsfeed/admin/cron.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: cron.php 6224 2001-07-20 11:21:41Z jakobn $
5 //
6 // Created on: <13-Dec-2000 10:20:45 bf>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27
28 // this file is designed to run as a cron job
29
30 // include_once( "eznewsfeed/classes/eznews.php" );
31 // include_once( "eznewsfeed/classes/eznewscategory.php" );
32 // include_once( "eznewsfeed/classes/eznewsimporter.php" );
33 // include_once( "eznewsfeed/classes/ezsourcesite.php" );
34
35 // include_once( "classes/ezdatetime.php" );
36
37 // This will fetch the news from every source site
38 $Action = "ImportNews";
39
40 if ( $Action == "ImportNews" )
41 {
42 $sourceSite = new eZSourceSite();
43
44 $sourceSiteList = $sourceSite->getAll();
45
46 foreach ( $sourceSiteList as $site )
47 {
48 print( "importing news from: ". $site->decoder() );
49 unset( $newsImporter );
50 $newsImporter = new eZNewsImporter( $site->decoder(),
51 $site->url(),
52 $site->category(),
53 $site->login(),
54 $site->password(),
55 $site->autoPublish() );
56 $newsImporter->importNews();
57 }
58 }
59
60 ?>
eZNewsImporter
Definition: eznewsimporter.php:46
eZSourceSite
Definition: ezsourcesite.php:44
$Action
$Action
Definition: eznewsfeed/admin/cron.php:38
$sourceSite
$sourceSite
Definition: importnews.php:101
$sourceSiteList
$sourceSiteList
Definition: importnews.php:103
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.