<?php
-function url(){
+function url() {
$protocol = "http";
if(isset($_SERVER['HTTPS']))
if($_SERVER['HTTPS'] != "off")
$tpl->assign( "title", $title);
$tpl->assign( "content", $content);
- $tpl->assign( "version", VERSION);
-
$tpl->draw( "index"); // draw the template
}
<?php
-
-define("VERSION", "0.0.3");
-
header('Content-type:text/html; charset=utf-8');
-// Set locale to French
-setlocale(LC_ALL, 'fr_FR');
-// set timezone to Europe/Paris
+setlocale(LC_ALL, 'fr_FR');
date_default_timezone_set('Europe/Paris');
-// set charset to utf-8 important since all pages will be transform to utf-8
-header('Content-Type: text/html;charset=utf-8');
-
-// get readability library
require_once dirname(__FILE__).'/inc/Readability.php';
-
-// get Encoding library.
require_once dirname(__FILE__).'/inc/Encoding.php';
-
-// appel de la libraire RainTPL.
require_once dirname(__FILE__).'/inc/rain.tpl.class.php';
-
include dirname(__FILE__).'/inc/functions.php';
-// EXUCUTION CODE
-
-
if(isset($_GET['url']) && $_GET['url'] != null && trim($_GET['url']) != "") {
// get url link
if(strlen(trim($_GET['url'])) > 2048) {
echo "Error unable to get link : ".$url;
}
}
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file