コード例 #1
0
<?php

ini_set('error_reporting', 1);
ini_set('display_errors', 1);
include "../WEB-INC/conf.php";
include "../WEB-INC/class.mysql.php";
include "../WEB-INC/class.api.php";
$api = new clsApi();
if (isset($_POST['sum']) == md5(date("Ymd"))) {
    $api->feed("add", array("url" => $_POST['url'], "lang" => "en"));
}
?>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>Add new RSS-feed - BeeBlog.org</title>
	        <link href="css/960.css" rel="stylesheet" type="text/css" />
	        <link href="css/v0.1.css" rel="stylesheet" type="text/css" />
	        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
	</head>
	<body>
        <div class="container_12" id="header">
            <div class="grid_12">
                RSS-feeds: <span id="getnumderrssfeeds" style="font-weight: 600"></span>
                Articles <span id="getnumderarticles" style="font-weight: 600"></span>
                <a href="addfeed.php">Add new RSS-feed</a>
                <a href="stat.php">View statistics</a>
            </div>

コード例 #2
0
<?php

//ini_set('error_reporting', 1);
//ini_set('display_errors', 1);
set_time_limit(0);
include "../WEB-INC/conf.php";
date_default_timezone_set($default_timezone);
include "../WEB-INC/class.mysql.php";
include "../WEB-INC/class.api.php";
include "../WEB-INC/class.downloader.php";
include "../WEB-INC/class.contain.feed.php";
include "../WEB-INC/class.contain.item.php";
include "../WEB-INC/class.feed.php";
include "../WEB-INC/class.keyword.php";
include "../WEB-INC/class.data.php";
$api = new clsApi();
$api->crawler("all", array("limit" => 10));
コード例 #3
0
ファイル: index.php プロジェクト: vanzhiganov/NewsArggregator
<?php

// index.php
include '../WEB-INC/conf.php';
include '../WEB-INC/class.mysql.php';
include '../WEB-INC/class.api.php';
$api = new clsApi();
$method = isset($_GET['method']) ? strtolower(trim($_GET['method'])) : null;
$parameter = isset($_GET['parameter']) ? strtolower(trim($_GET['parameter'])) : null;
switch ($method) {
    // FEEDS
    case 'feed_add':
        $parameter->url = isset($_REQUEST['url']) ? $_REQUEST['url'] : null;
        $api->feed_add($parameter);
        break;
    case 'feed_get':
        $feed_id = isset($_REQUEST['feed_id']) ? $_REQUEST['feed_id'] : null;
        //$feed_id = (isset($_REQUEST['feed_id'])) ? $_REQUEST['feed_id'] : null;
        break;
        // ITEM
    // ITEM
    case 'item_get':
        break;
        // KEYWORD
    // KEYWORD
    case 'keyword_get':
        break;
        // STAT
    // STAT
    case 'stat_get_total_feeds':
        $parameter->object = "total_feeds";
コード例 #4
0
ファイル: item.php プロジェクト: vanzhiganov/NewsArggregator
<?php

ini_set("error_reporting", 1);
ini_set("display_errors", 1);
include "../WEB-INC/conf.php";
include "../WEB-INC/class.mysql.php";
include "../WEB-INC/class.api.php";
$intItemID = isset($_GET['item_id']) ? $_GET['item_id'] : false;
if (!$intItemID) {
    header("Location: ./");
    exit;
}
$api = new clsApi();
$result = $api->feed("item_get", array("item_id" => $intItemID));
if (!$result['result']['total']) {
    header("location: /");
    exit;
}
$item = $result['result']['items'];
/*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();
*/
//$arrItem = $bbpost->get_item($intItemID);
//$arrFeed = $cData->get_feed($arrItem->feed_id);
#-------------------------------------------------------------------------------