application/libraries/MY_Form_validation.php
/**
     * Validates that a URL is accessible. Also takes ports into consideration. 
     * Note: If you see "php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known" 
     *          then you are having DNS resolution issues and need to fix Apache
     *
     * @access  public
     * @param   string
     * @return  string
     */
Validates that a URL is accessible. Also takes ports into consideration.
Note: If you see "php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known"
then you are having DNS resolution issues and need to fix Apache

@access  public
@param   string
@return  string
Validates that a URL is accessible . Also takes ports into consideration . Note : If you see " php_network_getaddresses : getaddrinfo failed : nodename nor servname provided or not known " then you are having DNS resolution issues and need to fix Apache @access public @param string @return string
function url_exists($url){                                   
        $url_data = parse_url($url); 
        if(!fsockopen($url_data['host'], isset($url_data['port']) ? $url_data['port'] : 80)){
            $this->set_message('url_exists', 'The URL you entered is not accessible.');
            return FALSE;
        }               
        return TRUE;
    }
function url_exists ( $ url ) { $ url_data = parse_url ( $ url ) ; if ( ! fsockopen ( $ url_data [ 'host' ] , isset ( $ url_data [ 'port' ] ) ? $ url_data [ 'port' ] : 80 ) ) { $ this -> set_message ( 'url_exists' , 'The URL you entered is not accessible.' ) ; return FALSE ; } return TRUE ; }
Validates that a URL is accessible.
Validates that a URL is accessible .
// scheme, host, port, path, query