aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Include/myFunctions.php
diff options
context:
space:
mode:
authorAntonio Gallo <tonicucoz@gmail.com>2011-09-09 16:32:53 +0000
committerAntonio Gallo <tonicucoz@gmail.com>2011-09-09 16:32:53 +0000
commit0d8e43d9686f73ce1b7ace93f39aabf251b873a9 (patch)
tree2a55133021718d0a0c89b94ac5289bce3a43dc40 /h-source/Application/Include/myFunctions.php
parent8d7619d5ffe9bd308ae628cc8243de3d572ff9d9 (diff)
improved the function to detect URLs
Diffstat (limited to 'h-source/Application/Include/myFunctions.php')
-rw-r--r--h-source/Application/Include/myFunctions.php2
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\+\&amp;]+)+)?(#[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\+\&amp;]+)+)?(#[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\+\&amp;]+)+)?(#[a-zA-Z0-9\_\-\+\s]+)?([\s]*)?$/';
if (preg_match($match,$url))
{