diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-09-09 16:32:53 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-09-09 16:32:53 +0000 |
commit | 0d8e43d9686f73ce1b7ace93f39aabf251b873a9 (patch) | |
tree | 2a55133021718d0a0c89b94ac5289bce3a43dc40 /h-source/Application/Include | |
parent | 8d7619d5ffe9bd308ae628cc8243de3d572ff9d9 (diff) |
improved the function to detect URLs
Diffstat (limited to 'h-source/Application/Include')
-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 5a59d0b..855af01 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)) { |