File size: 2.73Kb
<?php
error_reporting(E_ALL ^ E_NOTICE);
// Twitter's API URL - you can also use https://api.twitter.com/1/ if you want a secure connection to Twitter
define('API_URL','http://api.twitter.com/1/');
// Cookie encryption key. Max 52 characters
define('ENCRYPTION_KEY', 'Example Key - Change Me!');
// OAuth consumer and secret keys. Available from http://twitter.com/oauth_clients
define('OAUTH_CONSUMER_KEY', 'oYlWZDgy8aRdFOiGZpOv6g');
define('OAUTH_CONSUMER_SECRET', 'OXAJGBFLXTGgAXY1nIPV7QKFpnTDu131tpVaLr6M0');
// Embedly Key
// Embed image previews in tweets
// Sign up at https://app.embed.ly/
define('EMBEDLY_KEY', '');
// bit.ly login and API key for URL shortening
define('BITLY_LOGIN', '');
define('BITLY_API_KEY', '');
// API key for Twitpic - sign up at http://dev.twitpic.com/
define('TWITPIC_API_KEY', 'caa3e8932b7af2c62f9cb054d9aeb77f');
// API key for InMobi adverts - sign up at http://inmobi.com/
define('INMOBI_API_KEY', '');
// Optional: Allows you to turn shortened URLs into long URLs http://www.longurlplease.com/docs
// Uncomment to enable.
// define('LONGURL_KEY', 'true');
// Optional: Enable to view page processing and API time
define('DEBUG_MODE', 'ON');
// Base URL, should point to your website, including a trailing slash
// Can be set manually but the following code tries to work it out automatically.
$base_url = 'http://'.$_SERVER['HTTP_HOST'];
if ($directory = trim(dirname($_SERVER['SCRIPT_NAME']), '/\,')) {
$base_url .= '/'.$directory;
}
define('BASE_URL', $base_url.'/');
// MySQL storage of OAuth login details for users
define('MYSQL_USERS', 'OFF'); // ON to use MySQL and OFF to disable MySQL
mysql_connect('localhost', 'Your Database Username', 'Your Database Password');
mysql_select_db('Your Database');
/* The following table is needed to store user login details if you enable MYSQL_USERS:
CREATE TABLE IF NOT EXISTS `user` (
`username` varchar(64) NOT NULL,
`oauth_key` varchar(128) NOT NULL,
`oauth_secret` varchar(128) NOT NULL,
`password` varchar(32) NOT NULL,
PRIMARY KEY (`username`)
)
*/
// Google Analytics Mobile tracking code
// You need to download ga.php from the Google Analytics website for this to work
// Copyright 2009 Google Inc. All Rights Reserved.
$GA_ACCOUNT = "";
$GA_PIXEL = "ga.php";
function googleAnalyticsGetImageUrl() {
global $GA_ACCOUNT, $GA_PIXEL;
$url = "";
$url .= $GA_PIXEL . "?";
$url .= "utmac=" . $GA_ACCOUNT;
$url .= "&utmn=" . rand(0, 0x7fffffff);
$referer = $_SERVER["HTTP_REFERER"];
$query = $_SERVER["QUERY_STRING"];
$path = $_SERVER["REQUEST_URI"];
if (empty($referer)) {
$referer = "-";
}
$url .= "&utmr=" . urlencode($referer);
if (!empty($path)) {
$url .= "&utmp=" . urlencode($path);
}
$url .= "&guid=ON";
return str_replace("&", "&", $url);
}
?>