public function cleanURL( $input ) {
		// scheme and www
		$url = preg_replace( '/^((https?:|ftp:)?(\/\/))?(www\.)?/', '', $input );
		// fragment
		$url = preg_replace( '/#.*/', '', $url );
		// trailing slash
		$url = preg_replace( '{/$}', '', $url );

		return $url;
	}
public function cleanURL( $input ) {
		// scheme and www
		$url = preg_replace( '/^((https?:|ftp:)?(\/\/))?(www\.)?/', '', $input );
		// fragment
		$url = preg_replace( '/#.*/', '', $url );
		// trailing slash
		$url = preg_replace( '{/$}', '', $url );

		return $url;
	}
public function cleanURL ( $ input ) { // scheme and www $ url = preg_replace ( '/^((https?:|ftp:)?(\/\/))?(www\.)?/' , '' , $ input ) ; // fragment $ url = preg_replace ( '/#.*/' , '' , $ url ) ; // trailing slash $ url = preg_replace ( '{/$}' , '' , $ url ) ; return $ url ; }
Remove scheme, 'www', URL fragment, leading forward slashes and trailing slash

@param string $input
@return string Cleaned url string
Remove scheme www URL fragment leading forward slashes and trailing slash