@@ 11-22 (lines=12) @@ | ||
8 | private static $SITEMAP_EXPIRATION = 604800; |
|
9 | private static $RSS_EXPIRATION = 604800; |
|
10 | ||
11 | public static function sendJSON() |
|
12 | { |
|
13 | $array = array( |
|
14 | 'HTTP/1.1 200 OK', |
|
15 | 'Cache-Control: no-cache', |
|
16 | 'Content-Language: en', |
|
17 | 'Content-Type: application/json', |
|
18 | 'Expires: ' . self::get_date(time() - 1), |
|
19 | 'Last-Modified: ' . self::get_date(), |
|
20 | 'X-Powered-By: jacobemerick.com'); |
|
21 | self::send($array); |
|
22 | } |
|
23 | ||
24 | public static function sendSitemap() |
|
25 | { |
|
@@ 37-48 (lines=12) @@ | ||
34 | self::send($array); |
|
35 | } |
|
36 | ||
37 | public static function sendHTML() |
|
38 | { |
|
39 | $array = array( |
|
40 | 'HTTP/1.1 200 OK', |
|
41 | 'Cache-Control: no-cache', |
|
42 | 'Content-Language: en', |
|
43 | 'Content-Type: text/html', |
|
44 | 'Expires: ' . self::get_date(time() - 1), |
|
45 | 'Last-Modified: ' . self::get_date(), |
|
46 | 'X-Powered-By: jacobemerick.com'); |
|
47 | self::send($array); |
|
48 | } |
|
49 | ||
50 | public static function redirect($location, $method = 301) |
|
51 | { |
|
@@ 56-67 (lines=12) @@ | ||
53 | exit(); |
|
54 | } |
|
55 | ||
56 | public static function send404() |
|
57 | { |
|
58 | $array = array( |
|
59 | 'HTTP/1.1 404 Not Found', |
|
60 | 'Cache-Control: no-cache', |
|
61 | 'Content-Language: en', |
|
62 | 'Content-Type: text/html', |
|
63 | 'Expires: ' . self::get_date(time() - 1), |
|
64 | 'Last-Modified: ' . self::get_date(), |
|
65 | 'X-Powered-By: jacobemerick.com'); |
|
66 | self::send($array); |
|
67 | } |
|
68 | ||
69 | public static function send503() |
|
70 | { |
|
@@ 69-80 (lines=12) @@ | ||
66 | self::send($array); |
|
67 | } |
|
68 | ||
69 | public static function send503() |
|
70 | { |
|
71 | $array = array( |
|
72 | 'HTTP/1.1 503 Service Unavailable', |
|
73 | 'Cache-Control: no-cache', |
|
74 | 'Content-Language: en', |
|
75 | 'Content-Type: text/html', |
|
76 | 'Expires: ' . self::get_date(time() - 1), |
|
77 | 'Last-Modified: ' . self::get_date(), |
|
78 | 'X-Powered-By: jacobemerick.com'); |
|
79 | self::send($array); |
|
80 | } |
|
81 | ||
82 | private static function send($array, $gzip = true) |
|
83 | { |