本文整理汇总了PHP中data::get_feed方法的典型用法代码示例。如果您正苦于以下问题:PHP data::get_feed方法的具体用法?PHP data::get_feed怎么用?PHP data::get_feed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类data
的用法示例。
在下文中一共展示了data::get_feed方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: indexItem
/**
* индексирование всех rss-каналов
*/
public function indexItem($FeedId)
{
//<<<<<<< HEAD
// $data = new data();
//
// // выбираем из БД список каналов в массив
// $feed = $data->get_feed($FeedId);
//=======
$cl_data = new data();
// выбираем из БД список каналов в массив
$feed = $cl_data->get_feed($FeedId);
//>>>>>>> 958c783d1dc17f005a9a687915688f2dc8255bf1
$intFeedId = $feed->feed_id;
$strFeedUrl = $feed->feed_url;
$strFeedLastIndex = $feed->lastindex;
$_timer_start = date("Ymdhis");
// качаем канал
$_spider_channel_status = $this->spider_channel($intFeedId, $strFeedUrl);
$_timer_stop = date("Ymdhis");
//echo "".($cio++).". {$strFeedUrl} ... time: ".($_timer_stop - $_timer_start)." ... [".(($_spider_channel_status == true) ? "OK" : "ERR")."]\n";
echo "url: {$strFeedUrl}\n";
echo "time: " . ($_timer_stop - $_timer_start) . "\n";
echo "scan status: " . ($_spider_channel_status == true ? "OK" : "ERR") . "\n";
}
示例2: db
include "../WEB-INC/conf.php";
include_once "../WEB-INC/class.db.php";
include_once "../WEB-INC/class.contain.feed.php";
include_once "../WEB-INC/class.contain.item.php";
include_once "../WEB-INC/class.data.php";
include_once "../WEB-INC/class.post.php";
$cDb = new db();
$cData = new data();
$bbpost = new post();
$intItemID = isset($_GET['item_id']) ? $_GET['item_id'] : false;
if (!$intItemID) {
header("Location: /");
exit;
}
$arrItem = $bbpost->get_item($intItemID);
$arrFeed = $cData->get_feed($arrItem->feed_id);
#-------------------------------------------------------------------------------
$intFeedID = $arrFeed->feed_id;
$strFeedUrl = $arrFeed->url;
$strFeedTitle = $arrFeed->title ? $arrFeed->title : "unknown";
$strFeedLink = $arrFeed->link;
$strFeedDescr = $arrFeed->description;
$strImgUrl = $arrFeed->image_url;
$strImgTitle = $arrFeed->image_title;
$strImgLink = $arrFeed->image_link;
$strItemID = $arrItem->item_id;
$strItemTitle = $arrItem->title;
$strItemLink = $arrItem->link;
$strItemDescription = $arrItem->description;
$strItemPubDate = date(GA_A_FORMATDATE, strtotime($arrItem->pubdate_int));
$strItemCategory = $arrItem->category;
示例3: linkFeedAll
if ($maxpages > $page) {
if ($stop < $intLastItems) {
$to_next = true;
}
}
}
$but_to_back = $to_back ? "<a href='" . linkFeedAll($page - 1) . "'>< Back</a> " : null;
$but_to_next = $to_next ? "<a href='" . linkFeedAll($page + 1) . "'>Next ></a>" : null;
// global vars
$strPage = isset($_GET['view']) ? $_GET['view'] : null;
$intChannelID = isset($_GET['channel']) ? $_GET['channel'] : false;
$username = isset($_POST['username']) ? $_POST['username'] : null;
$password = isset($_POST['password']) ? sha1($_POST['password']) : null;
//sha1 encryption has been used here this can be changed when changed, you will also need to change the passwords in the config file.
for ($c = 0; $intLastItems > $c; $c++) {
$arrFeed = $cData->get_feed($arrLastItems[$c]->feed_id);
$strFeedTitle = !$arrFeed->title ? "Unknown" : $arrFeed->title;
$item_id = $arrLastItems[$c]->item_id;
$item_title = !$arrLastItems[$c]->title ? "Unknown" : $arrLastItems[$c]->title;
$item_link = $arrLastItems[$c]->link;
// $item_descr = $arrLastItems[$c]->description;
// $item_short_descr = $arrLastItems[$c]->short_description_word($arrLastItems[$c]->remove_tags($arrLastItems[$c]->description));
$item_pubDate = date('d.m.Y h:i', strtotime($arrLastItems[$c]->pubdate_int));
// $item_comments = ($arrLastItems[$c]->comments) ? "<div class=\"comments\"><a title=\"читать комментарии\" href=\"".$arrLastItems[$c]->comments."\"><span class=\"all\">читать комментарии →</span></a></div>" : null;
$strItemLinkToFeed = linkFeedFeed($arrFeed->feed_id);
$strItemLinkToItem = linkFeedItem($item_id);
$return .= <<<DDD
<div>
<div class="item">
<div>
<div class="hentry">
示例4: count
$to_next = true;
}
} else {
$intStart = $intPage * $intStep - $intStep;
$intStop = $intStart + $intStep;
$to_next = false;
$to_back = true;
if ($intMaxPages > $intPage) {
if ($intStop < $intFeedItems) {
$to_next = true;
}
}
}
$but_to_back = $to_back ? "<a href='/feed/{$intFeedID}-" . ($intPage - 1) . ".html'>< Back</a> " : null;
$but_to_next = $to_next ? "<a href='/feed/{$intFeedID}-" . ($intPage + 1) . ".html'>Next ></a>" : null;
$arrFeed = $cData->get_feed($intFeedID);
$arrItems = $cData->get_items($intFeedID, "NOW", null, "`pubdate_int`", "DESC", $intStart, 20);
$intItems = count($arrItems);
$feed_id = $arrFeed->feed_id;
$feed_url = $arrFeed->url;
$feed_link = $arrFeed->link;
$feed_title = $arrFeed->title != "" ? $arrFeed->title : "unknown";
for ($c = 0; $intItems > $c; $c++) {
$item_title = $arrItems[$c]->title;
$item_link = $arrItems[$c]->link;
$item_id = $arrItems[$c]->item_id;
// $item_descr = $arrItems[$c]->description;
//$item_pubdate = $chi['items'][$c]['pubDate'];
// $item_pubdate = date("Y.m.d, h:i:s", strtotime($arrItems[$c]->pubdate_int));
$item_pubDate = date('d.m.Y h:i', strtotime($arrLastItems[$c]->pubdate_int));
$item_category = $arrItems[$c]->category;