private function maxmind() {

		$reader = new Reader( $this->opts['maxmind_db'] );
		try {
			$record = $reader->get( $this->ip );
			if ( empty( $record ) ) {
				throw new AddressNotFoundException( 'Ip Address not found' );
			}
			$reader->close();

			return $this->cleanResponse( RecordConverter::maxmindRecord( $record ) );
		} catch ( AddressNotFoundException $e ) {
			throw new AddressNotFoundException( (string) $e->getMessage() );
		} catch ( \Exception $e ) {
			throw new GeotException( $e->getMessage() );
		}

	}
private function maxmind() {

		$reader = new Reader( $this->opts['maxmind_db'] );
		try {
			$record = $reader->get( $this->ip );
			if ( empty( $record ) ) {
				throw new AddressNotFoundException( 'Ip Address not found' );
			}
			$reader->close();

			return $this->cleanResponse( RecordConverter::maxmindRecord( $record ) );
		} catch ( AddressNotFoundException $e ) {
			throw new AddressNotFoundException( (string) $e->getMessage() );
		} catch ( \Exception $e ) {
			throw new GeotException( $e->getMessage() );
		}

	}
private function maxmind ( ) { $ reader = new Reader ( $ this -> opts [ 'maxmind_db' ] ) ; try { $ record = $ reader -> get ( $ this -> ip ) ; if ( empty ( $ record ) ) { throw new AddressNotFoundException ( 'Ip Address not found' ) ; } $ reader -> close ( ) ; return $ this -> cleanResponse ( RecordConverter :: maxmindRecord ( $ record ) ) ; } catch ( AddressNotFoundException $ e ) { throw new AddressNotFoundException ( ( string ) $ e -> getMessage ( ) ) ; } catch ( \ Exception $ e ) { throw new GeotException ( $ e -> getMessage ( ) ) ; } }
Use maxmind local db
@return GeotRecord
@throws AddressNotFoundException
@throws GeotException
Use maxmind local db