本文整理汇总了PHP中feed::fetchImages方法的典型用法代码示例。如果您正苦于以下问题:PHP feed::fetchImages方法的具体用法?PHP feed::fetchImages怎么用?PHP feed::fetchImages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类feed
的用法示例。
在下文中一共展示了feed::fetchImages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: feed
// Add news feed
$db->delete("Feeds", "rss='http://www.csmonitor.com/rss/top.rss'");
$db->insert("Feeds", "wireid,title,url,rss,lastFetch,feedType,specialType,loadoptions,userid,tagList", "0,'Christian Science Monitor','http://www.csmonitor.com','http://www.csmonitor.com/rss/top.rss','date_sub(NOW(), INTERVAL 3 DAY)','wire','default','none',0,''");
if (defined('ENABLE_IMAGES') and ENABLE_IMAGES) {
$db->delete("Feeds", "rss='http://api.flickr.com/services/feeds/photos_public.gne?id=44917946@N03&lang=en-us&format=atom'");
$db->insert("Feeds", "wireid,title,url,rss,lastFetch,feedType,specialType,loadoptions,userid,tagList", "0,'Flickr Default Pool','http://www.flickr.com/photos/44917946@N03/','http://api.flickr.com/services/feeds/photos_public.gne?id=44917946@N03&lang=en-us&format=atom','date_sub(NOW(), INTERVAL 30 DAY)','images','flickrContent','all',0,''");
}
// Fetch newswire articles
echo 'Reading in newswire feed...<br />';
require_once SRC_ROOT . '/core/classes/feed.class.php';
$feedObj = new feed($db);
$feedObj->fetchFeeds();
echo 'Completed newswire fetch...<br />';
if (defined('ENABLE_IMAGES') and ENABLE_IMAGES) {
echo 'Reading in media flickr feed...<br />';
$feedObj->fetchImages();
echo 'Completed media flickr fetch...<br />';
}
// Populate Micro blog twitter room
if (defined('ENABLE_MICRO')) {
if (TWITTER_USER == '' or TWITTER_PWD == '') {
echo 'Please set TWITTER_USER and TWITTER_PWD in your constants.php file and/or .ini file <br />';
} else {
echo 'Reading in twitter accounts...<br />';
// sync twitter service accounts for micro blog room - done daily
require_once PATH_FACEBOOK . "/classes/micro.class.php";
$mObj = new micro();
$mObj->cleanRoom();
try {
$mObj->syncFriends(false);
$mObj->updateRoom();
示例2: runJob
//.........这里部分代码省略.........
$currentDayOfWeek = date('w');
// day of week 0-6
$currentDayOfMonth = date('j');
// day of month 1-31
require_once 'siteMap.class.php';
$smObj = new siteMap($this->db);
// do always - build the map for content from the last hour
$smObj->buildMap('hourly');
// only do this as midnight
if ($currentHour == 0) {
// map to all the content from the last day
$smObj->buildMap('daily');
}
// only do this at 3 am on first day of week
if ($currentDayOfWeek = 0 and $currentHour == 3) {
// map to all the content from the last week, etc.
$smObj->buildMap('weekly');
}
// only do this at 2 am on first day of month
if ($currentDayOfMonth == 1 and $currentHour == 2) {
$smObj->buildMap('monthly');
}
// call buildIndexMap after updating any individual child maps above
// just the time stamps from each individual map file are updated in the indexmap
// warning: if a individual map hasn't been built - the index map won't include a reference to it
$smObj->buildIndexMap();
break;
case 'fetchFeeds':
// import stories from feeds
require_once 'feed.class.php';
$feedObj = new feed($this->db);
$feedObj->fetchBookmarks();
$feedObj->fetchFeeds();
$feedObj->fetchImages();
if ($feedObj->newStoryLoaded) {
// update features
}
break;
case 'logHourlyStats':
require_once 'statistics.class.php';
$statsObj = new statistics($this->db);
$statsObj->logHourlyStats();
break;
case 'facebookMinifeed':
require_once PATH_FACEBOOK . "/classes/app.class.php";
$app = new app(NULL, true);
$facebook =& $app->loadFacebookLibrary();
require_once PATH_FACEBOOK . '/classes/miniFeeds.class.php';
$feedObj = new miniFeeds($this->db);
$feedObj->loadFacebook($facebook);
$feedObj->updateMiniFeeds();
break;
case 'facebookProfileBoxes':
require_once PATH_FACEBOOK . "/classes/app.class.php";
$app = new app(NULL, true);
$facebook =& $app->loadFacebookLibrary();
require_once PATH_FACEBOOK . '/classes/profileBoxes.class.php';
$proObj = new profileBoxes($this->db);
$proObj->loadFacebook($facebook);
$proObj->updateProfileBoxes();
break;
case 'facebookEmailEngine':
// tbd
break;
case 'facebookAllocations':
// check nightly facebook allocations