Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • NetGeoIp
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class NetGeoIp

NetGeoIP component that wraps Maxmind's GeoIP system. Requires mbstring extension to be enabled with PHP (due to poor coding standards on MaxMind's part).

NetGeoIp uses Blesta\Core\Util\Common\Traits\Container
Package: blesta\components\net\net\geo\ip
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at components/net/net_geo_ip/net_geo_ip.php
Methods summary
public
# __construct( )

Create a new GeoIP instance using the given database file

Create a new GeoIP instance using the given database file

public string
# getCountryCode( string $ip = null )

Returns the 2-character country code where the IP resides

Returns the 2-character country code where the IP resides

Parameters

$ip
The IP address to lookup, if null will use user's IP

Returns

string
The 2-character country code where the IP resides

See

NetGeoIp::getLocation()
public string
# getCountryName( string $ip = null )

Returns the name of the country where the IP resides

Returns the name of the country where the IP resides

Parameters

$ip
The IP address to lookup, if null will use user's IP

Returns

string
The name of the country where the IP resides

See

NetGeoIp::getLocation()
public array
# getLocation( string $ip = null )

Fetches an array of information about the location of the IP address, including longitude and latitude.

Fetches an array of information about the location of the IP address, including longitude and latitude.

Parameters

$ip
The IP address to lookup, if null will use user's IP

Returns

array
An array of information about the location of the IP address
public string
# getRegion( string $ip = null )

Get the region (e.g. state) of the given IP address.

Get the region (e.g. state) of the given IP address.

Parameters

$ip
The IP address to lookup, if null will use user's IP

Returns

string
The region the IP address resides in

See

NetGeoIp::getLocation()
public string
# getOrg( string $ip = null )

Get the organization or ISP that owns the IP address. Requires a premium database.

Get the organization or ISP that owns the IP address. Requires a premium database.

Parameters

$ip
The IP address to lookup, if null will use user's IP

Returns

string
The oraganization the IP address belongs to
public string
# getGeoIpDatabaseFilename( string $version = '2' )

Gets the name of the database file expected for the given version

Gets the name of the database file expected for the given version

Parameters

$version
The GeoIp version to get the filename for

Returns

string
The name of the database file
Methods used from Blesta\Core\Util\Common\Traits\Container
getFromContainer()
Blesta API documentation generated by ApiGen