diff options
Diffstat (limited to 'readityourself.php')
-rwxr-xr-x | readityourself.php | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/readityourself.php b/readityourself.php index 451b5878..588baeca 100755 --- a/readityourself.php +++ b/readityourself.php | |||
@@ -1,31 +1,14 @@ | |||
1 | <?php | 1 | <?php |
2 | |||
3 | define("VERSION", "0.0.3"); | ||
4 | |||
5 | header('Content-type:text/html; charset=utf-8'); | 2 | header('Content-type:text/html; charset=utf-8'); |
6 | // Set locale to French | ||
7 | setlocale(LC_ALL, 'fr_FR'); | ||
8 | 3 | ||
9 | // set timezone to Europe/Paris | 4 | setlocale(LC_ALL, 'fr_FR'); |
10 | date_default_timezone_set('Europe/Paris'); | 5 | date_default_timezone_set('Europe/Paris'); |
11 | 6 | ||
12 | // set charset to utf-8 important since all pages will be transform to utf-8 | ||
13 | header('Content-Type: text/html;charset=utf-8'); | ||
14 | |||
15 | // get readability library | ||
16 | require_once dirname(__FILE__).'/inc/Readability.php'; | 7 | require_once dirname(__FILE__).'/inc/Readability.php'; |
17 | |||
18 | // get Encoding library. | ||
19 | require_once dirname(__FILE__).'/inc/Encoding.php'; | 8 | require_once dirname(__FILE__).'/inc/Encoding.php'; |
20 | |||
21 | // appel de la libraire RainTPL. | ||
22 | require_once dirname(__FILE__).'/inc/rain.tpl.class.php'; | 9 | require_once dirname(__FILE__).'/inc/rain.tpl.class.php'; |
23 | |||
24 | include dirname(__FILE__).'/inc/functions.php'; | 10 | include dirname(__FILE__).'/inc/functions.php'; |
25 | 11 | ||
26 | // EXUCUTION CODE | ||
27 | |||
28 | |||
29 | if(isset($_GET['url']) && $_GET['url'] != null && trim($_GET['url']) != "") { | 12 | if(isset($_GET['url']) && $_GET['url'] != null && trim($_GET['url']) != "") { |
30 | // get url link | 13 | // get url link |
31 | if(strlen(trim($_GET['url'])) > 2048) { | 14 | if(strlen(trim($_GET['url'])) > 2048) { |
@@ -57,5 +40,4 @@ if(isset($_GET['url']) && $_GET['url'] != null && trim($_GET['url']) != "") { | |||
57 | echo "Error unable to get link : ".$url; | 40 | echo "Error unable to get link : ".$url; |
58 | } | 41 | } |
59 | } | 42 | } |
60 | } | 43 | } \ No newline at end of file |
61 | ?> \ No newline at end of file | ||