-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
88 lines (69 loc) · 2.64 KB
/
config.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?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/');
// Image Proxy URL
// Use http://src.sencha.io/ for regular connections
// Use https://tinysrc.appspot.com/ for SSL connections
define('IMAGE_PROXY_URL', 'https://tinysrc.appspot.com/');
// Cookie encryption key. Max 52 characters
define('ENCRYPTION_KEY', '4l4yt0k3y');
// OAuth consumer and secret keys. Available from http://twitter.com/oauth_clients
define('OAUTH_CONSUMER_KEY', 'O50kfBfwHYrBpL4Sh4ldg');
define('OAUTH_CONSUMER_SECRET', 'nGcUO2YEoBhz0TvcHBvqZ9IACDxgHd19igg9foIHEMA');
// Embedly Key
// Embed image previews in tweets
// Sign up at https://app.embed.ly/
define('EMBEDLY_KEY', '6a13a584356d11e1a92e4040d3dc5c07');
// 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', 'OFF');
// 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');
// mysql_connect('localhost', 'username', 'password');
// mysql_select_db('dabr');
/* 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);
}
?>