Results 1 to 8 of 8
Threaded View
-
21st Jul 2011, 03:34 PM #8Respected MemberWebsite's:
DL4Everything.com Soft2050.inTry this now:
PHP Code:<?php
function addnvalidateurls($url){
// Modified By: Soft2050
if (!preg_match("@^[hf]tt?ps?://@", $url)) {
$url = "http://" . $url;
}
$pattern = '@((https?://)?([-\w]+\.[-\w\.]+)+\w(:\d+)?(/([-\w/_\.]*(\?\S+)?)?)*)@';
return preg_match($pattern, $url);
}
$result = addnvalidateurls('google.com');
echo '<script language="javascript">';
if ($result == 1)
echo "alert('Yes! The given url is validated')";
else {
echo "alert('No! the given url seems to be not working')";
}
echo '</script>';
?>
Or have a search for some premade regex using google or you can code yourself if you are good at it
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
VBSEO Urls
By viruz99 in forum Technical Help Desk SupportReplies: 0Last Post: 13th Nov 2011, 02:15 PM -
Issues with Recaptcha API urls
By NewEraCracker in forum Feedback and SuggestionsReplies: 1Last Post: 19th May 2011, 02:50 PM -
Re-write some URLs
By Chris2k in forum Web Application/Script SupportReplies: 4Last Post: 27th Mar 2011, 12:59 AM -
Blocked URLs
By Sun!l in forum Legal IssuesReplies: 2Last Post: 28th Feb 2010, 09:54 AM -
Legit DepositFiles Valid Accounts 1$ valid for 1 day
By piratebay in forum Completed TransactionsReplies: 2Last Post: 23rd Oct 2009, 01:56 PM
themaCreator - create posts from...
Version 3.52 released. Open older version (or...