URL Checker

This function check if an url is valid or not.

function is_valid_url($url)
{
   return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);
}

Tags

No tag here.

Recommended pages

Best way to get user ip address in php...

Here is a function to getting ip using filter of local and lan ip's. function get_ip() { $list = array( 'REMOTE_ADDR', 'CLIENT_IP', 'HTTP_CLIENT_IP', 'HTTP_PROXY_CONNECTION',...

Detect file extension function...

This function is used to find the file extension also you can use pathinfo() function for get information about a file path. function ext($file_name) { return substr($file_name, strrpos($fi...

Get all subsets of array...

If you have a list of items (for example)......

Number Format...

Format a number with grouped thousands......