summaryrefslogtreecommitdiff
path: root/ajaxGetTitle.php
diff options
context:
space:
mode:
Diffstat (limited to 'ajaxGetTitle.php')
-rw-r--r--ajaxGetTitle.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/ajaxGetTitle.php b/ajaxGetTitle.php
index d440802..2bec47c 100644
--- a/ajaxGetTitle.php
+++ b/ajaxGetTitle.php
@@ -25,6 +25,9 @@ header("Cache-Control: no-cache, must-revalidate");
require_once('header.inc.php');
+/* Managing all possible inputs */
+isset($_GET['url']) ? define('GET_URL', $_GET['url']): define('GET_URL', '');
+
function getTitle($url) {
$fd = @fopen($url, 'r');
if ($fd) {
@@ -65,6 +68,6 @@ echo '<?xml version="1.0" encoding="utf-8"?>';
getTitle
</method>
<result>
-<?php echo getTitle($_GET['url']); ?>
+<?php echo getTitle(GET_URL); ?>
</result>
</response>