From 1efc5660d9353947fab7d898eb4a5d2a1cfc07d8 Mon Sep 17 00:00:00 2001 From: Joey Schulze Date: Fri, 27 Jun 2008 13:34:06 +0000 Subject: [PATCH] Implement url check via AJAX --- lib/functions.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/functions.inc b/lib/functions.inc index 01c3a5f..c007edf 100644 --- a/lib/functions.inc +++ b/lib/functions.inc @@ -429,6 +429,16 @@ function is_valid_url($url) { return true; } +function ajax_check_url() +{ + global $POST; + + if (!empty($_POST['url']) && is_valid_url($_POST['url'])) + return true; + + return false; +} + function sendmail($to, $name, $subject, $body, $header=array()) { global $cfg; @@ -495,4 +505,4 @@ function hits_inc($zeitung) db_query($query); } -?> \ No newline at end of file +?> -- 2.20.1