| @@ 11-22 (lines=12) @@ | ||
| 8 | private static $SITEMAP_EXPIRATION = 604800; |
|
| 9 | private static $RSS_EXPIRATION = 604800; |
|
| 10 | ||
| 11 | public static function sendGIF($timestamp) |
|
| 12 | { |
|
| 13 | $array = array( |
|
| 14 | 'HTTP/1.1 200 OK', |
|
| 15 | 'Cache-Control: max-age=' . self::$CACHE_EXPIRATION . ', must-revalidate', |
|
| 16 | 'Content-Language: en', |
|
| 17 | 'Content-Type: image/gif', |
|
| 18 | 'Expires: ' . self::get_date(time() + self::$CACHE_EXPIRATION), |
|
| 19 | 'Last-Modified: ' . self::get_date($timestamp), |
|
| 20 | 'X-Powered-By: jacobemerick.com'); |
|
| 21 | self::send($array); |
|
| 22 | } |
|
| 23 | ||
| 24 | public static function sendJPG($timestamp) |
|
| 25 | { |
|
| @@ 24-35 (lines=12) @@ | ||
| 21 | self::send($array); |
|
| 22 | } |
|
| 23 | ||
| 24 | public static function sendJPG($timestamp) |
|
| 25 | { |
|
| 26 | $array = array( |
|
| 27 | 'HTTP/1.1 200 OK', |
|
| 28 | 'Cache-Control: max-age=' . self::$CACHE_EXPIRATION . ', must-revalidate', |
|
| 29 | 'Content-Language: en', |
|
| 30 | 'Content-Type: image/jpeg', |
|
| 31 | 'Expires: ' . self::get_date(time() + self::$CACHE_EXPIRATION), |
|
| 32 | 'Last-Modified: ' . self::get_date($timestamp), |
|
| 33 | 'X-Powered-By: jacobemerick.com'); |
|
| 34 | self::send($array); |
|
| 35 | } |
|
| 36 | ||
| 37 | public static function sendPNG($timestamp) |
|
| 38 | { |
|
| @@ 37-48 (lines=12) @@ | ||
| 34 | self::send($array); |
|
| 35 | } |
|
| 36 | ||
| 37 | public static function sendPNG($timestamp) |
|
| 38 | { |
|
| 39 | $array = array( |
|
| 40 | 'HTTP/1.1 200 OK', |
|
| 41 | 'Cache-Control: max-age=' . self::$CACHE_EXPIRATION . ', must-revalidate', |
|
| 42 | 'Content-Language: en', |
|
| 43 | 'Content-Type: image/png', |
|
| 44 | 'Expires: ' . self::get_date(time() + self::$CACHE_EXPIRATION), |
|
| 45 | 'Last-Modified: ' . self::get_date($timestamp), |
|
| 46 | 'X-Powered-By: jacobemerick.com'); |
|
| 47 | self::send($array); |
|
| 48 | } |
|
| 49 | ||
| 50 | public static function sendJSON() |
|
| 51 | { |
|
| @@ 63-74 (lines=12) @@ | ||
| 60 | self::send($array); |
|
| 61 | } |
|
| 62 | ||
| 63 | public static function sendSitemap() |
|
| 64 | { |
|
| 65 | $array = array( |
|
| 66 | 'HTTP/1.1 200 OK', |
|
| 67 | 'Cache-Control: max-age=' . self::$SITEMAP_EXPIRATION . ', must-revalidate', |
|
| 68 | 'Content-Language: en', |
|
| 69 | 'Content-Type: text/xml', |
|
| 70 | 'Expires: ' . self::get_date(time() + self::$SITEMAP_EXPIRATION), |
|
| 71 | 'Last-Modified: ' . self::get_date(), |
|
| 72 | 'X-Powered-By: jacobemerick.com'); |
|
| 73 | self::send($array); |
|
| 74 | } |
|
| 75 | ||
| 76 | public static function sendRSS() |
|
| 77 | { |
|
| @@ 76-87 (lines=12) @@ | ||
| 73 | self::send($array); |
|
| 74 | } |
|
| 75 | ||
| 76 | public static function sendRSS() |
|
| 77 | { |
|
| 78 | $array = array( |
|
| 79 | 'HTTP/1.1 200 OK', |
|
| 80 | 'Cache-Control: max-age=' . self::$RSS_EXPIRATION . ', must-revalidate', |
|
| 81 | 'Content-Language: en', |
|
| 82 | 'Content-Type: application/rss+xml', |
|
| 83 | 'Expires: ' . self::get_date(time() + self::$RSS_EXPIRATION), |
|
| 84 | 'Last-Modified: ' . self::get_date(), |
|
| 85 | 'X-Powered-By: jacobemerick.com'); |
|
| 86 | self::send($array); |
|
| 87 | } |
|
| 88 | ||
| 89 | public static function sendHTML() |
|
| 90 | { |
|