当前位置: 首页>>代码示例>>PHP>>正文


PHP data::get_feed方法代码示例

本文整理汇总了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";
 }
开发者ID:vanzhiganov,项目名称:NewsArggregator,代码行数:27,代码来源:class.crawler.php

示例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;
开发者ID:vanzhiganov,项目名称:NewsArggregator,代码行数:31,代码来源:item.php

示例3: linkFeedAll

    if ($maxpages > $page) {
        if ($stop < $intLastItems) {
            $to_next = true;
        }
    }
}
$but_to_back = $to_back ? "<a href='" . linkFeedAll($page - 1) . "'>< Back</a>&nbsp;&nbsp;" : 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\">читать комментарии &rarr;</span></a></div>" : null;
    $strItemLinkToFeed = linkFeedFeed($arrFeed->feed_id);
    $strItemLinkToItem = linkFeedItem($item_id);
    $return .= <<<DDD
        <div>
            <div class="item">
                <div>
                    <div class="hentry">
开发者ID:vanzhiganov,项目名称:NewsArggregator,代码行数:31,代码来源:index.php

示例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>&nbsp;&nbsp;" : 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;
开发者ID:vanzhiganov,项目名称:NewsArggregator,代码行数:31,代码来源:feed.php


注:本文中的data::get_feed方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。