diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-09-09 16:47:02 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-09-09 16:47:02 +0000 |
commit | 2f495778cbbb2a6b4f1d4ca55b79b89fb64a5c1d (patch) | |
tree | c9fad506aa7828a3595cf107412a62154d621712 /h-source/Application | |
parent | 0d8e43d9686f73ce1b7ace93f39aabf251b873a9 (diff) |
improved the function to detect URLs
Diffstat (limited to 'h-source/Application')
-rw-r--r-- | h-source/Application/Include/myFunctions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index 855af01..5636240 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -319,7 +319,7 @@ function checkUrl($url) { // $match = '/^http\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)?\.(com|net|it|info|org|eu|uk)((\/[a-zA-Z0-9\_\-\+]+)+[\/]?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/'; - $match = '/^http(s)?\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)*\.(com|net|it|info|org|eu|uk|ca|us|cl)((\/[a-zA-Z0-9\_\-\:\+]+)*(\/([a-zA-Z0-9\_\:\-\.\+]+\.(php|html|htm|asp|aspx|jsp|cgi))?)?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/'; + $match = '/^http(s)?\:\/\/(www\.)?[a-zA-Z0-9\-\_]+(\.[a-zA-Z0-9\-\_]+)*\.(com|net|it|info|org|eu|uk|ca|us|cl)((\/[a-zA-Z0-9\_\.\-\:\+]+)*(\/([a-zA-Z0-9\_\:\-\.\+]+\.(php|html|htm|asp|aspx|jsp|cgi))?)?)?(\?([a-zA-Z0-9\_\-\+\s]+\=[a-zA-Z0-9\_\-\s\+\&]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/'; if (preg_match($match,$url)) { |