forked from baserproject/basercms
/
mobile_controller.php
63 lines (60 loc) · 1.8 KB
/
mobile_controller.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
<?php
/* SVN FILE: $Id$ */
/**
* モバイルコントローラー
*
* PHP versions 5
*
* baserCMS : Based Website Development Project <http://basercms.net>
* Copyright 2008 - 2013, baserCMS Users Community <http://sites.google.com/site/baserusers/>
*
* @copyright Copyright 2008 - 2013, baserCMS Users Community
* @link http://basercms.net baserCMS Project
* @package baser.controllers
* @since baserCMS v 0.1.0
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://basercms.net/license/index.html
*/
/**
* モバイルコントローラー
*
* @package baser.controllers
*/
class MobileController extends AppController {
/**
* モデル
*
* @var array
* @access public
*/
var $uses = null;
/**
* モバイル GoogleAnalytics 用 ライブラリを読み込む
*
* return void
* access public
*/
function mobile_ga() {
if(empty($this->siteConfigs['google_analytics_id']) || !version_compare ( preg_replace('/[a-z-]/','', phpversion()), '5','>=')) {
header("Content-Type: image/gif");
header("Cache-Control: " .
"private, no-cache, no-cache=Set-Cookie, proxy-revalidate");
header("Pragma: no-cache");
header("Expires: Wed, 17 Sep 1975 21:32:10 GMT");
echo join(array(
chr(0x47), chr(0x49), chr(0x46), chr(0x38), chr(0x39), chr(0x61),
chr(0x01), chr(0x00), chr(0x01), chr(0x00), chr(0x80), chr(0xff),
chr(0x00), chr(0xff), chr(0xff), chr(0xff), chr(0x00), chr(0x00),
chr(0x00), chr(0x2c), chr(0x00), chr(0x00), chr(0x00), chr(0x00),
chr(0x01), chr(0x00), chr(0x01), chr(0x00), chr(0x00), chr(0x02),
chr(0x02), chr(0x44), chr(0x01), chr(0x00), chr(0x3b)
));
exit();
}
$_GET["utmac"] = str_replace('UA', 'MO', $this->siteConfigs['google_analytics_id']);
App::import('Vendor', 'ga');
exit();
}
}