예제 #1
0
파일: digg.php 프로젝트: ntulip/DiggLite
<?php

/**
 * Digg Lite reference application
 * 
 * @author    Bill Shupp <*****@*****.**>
 * @author    Jeff Hodsdon <*****@*****.**>
 * @copyright 2009 Digg, Inc.
 * @license   http://www.opensource.org/licenses/bsd-license.php FreeBSD
 * @link      http://digglite.com
 */
require_once '../config.php';
require_once 'DiggLite.php';
$diggLite = new DiggLite();
try {
    $diggLite->digg();
} catch (Exception $e) {
    $diggLite->error($e);
}
예제 #2
0
파일: config.php 프로젝트: ntulip/DiggLite
<?php

/**
 * Digg Lite reference application
 * 
 * @author    Bill Shupp <*****@*****.**>
 * @author    Jeff Hodsdon <*****@*****.**>
 * @copyright 2009 Digg, Inc.
 * @license   http://www.opensource.org/licenses/bsd-license.php FreeBSD
 * @link      http://digglite.com
 */
ini_set('include_path', '../PEAR:../lib:' . get_include_path());
require_once 'DiggLite.php';
DiggLite::$options = array('debug' => 0, 'apiKey' => 'key', 'apiSecret' => 'secret', 'apiUrl' => 'http://services.digg.com', 'apiEndpoint' => 'http://services.digg.com/1.0/endpoint', 'callback' => 'http://yourwebsite.com/callback.php', 'authorizeUrl' => 'http://digg.com/oauth/authenticate', 'cache' => 'CacheLite', 'cacheOptions' => array('cacheDir' => '/tmp/digglite/', 'lifeTime' => 60, 'hashedDirectoryLevel' => 2));
session_module_name('files');
session_start();
예제 #3
0
파일: bury.php 프로젝트: ntulip/DiggLite
<?php

/**
 * Digg Lite reference application
 * 
 * @author    Bill Shupp <*****@*****.**>
 * @author    Jeff Hodsdon <*****@*****.**>
 * @copyright 2009 Digg, Inc.
 * @license   http://www.opensource.org/licenses/bsd-license.php FreeBSD
 * @link      http://digglite.com
 */
require_once '../config.php';
require_once 'DiggLite.php';
$diggLite = new DiggLite();
try {
    $diggLite->bury();
} catch (Exception $e) {
    $diggLite->error($e);
}
예제 #4
0
<?php

/**
 * Digg Lite reference application
 * 
 * @author    Bill Shupp <*****@*****.**>
 * @author    Jeff Hodsdon <*****@*****.**>
 * @copyright 2009 Digg, Inc.
 * @license   http://www.opensource.org/licenses/bsd-license.php FreeBSD
 * @link      http://digglite.com
 */
require_once '../config.php';
require_once 'DiggLite.php';
if (!isset($_GET['oauth_token']) || !isset($_GET['oauth_verifier'])) {
    throw new Exception('Missing token or verifier');
}
$diggLite = new DiggLite();
try {
    $diggLite->callback();
} catch (Exception $e) {
    $diggLite->error($e);
}
예제 #5
0
파일: index.php 프로젝트: ntulip/DiggLite
<?php

/**
 * Digg Lite reference application
 * 
 * @author    Bill Shupp <*****@*****.**>
 * @author    Jeff Hodsdon <*****@*****.**>
 * @copyright 2009 Digg, Inc.
 * @license   http://www.opensource.org/licenses/bsd-license.php FreeBSD
 * @link      http://digglite.com
 */
require_once '../config.php';
require_once 'DiggLite.php';
$diggLite = new DiggLite();
try {
    $diggLite->main();
} catch (Exception $e) {
    $diggLite->error($e);
}