Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • areyouahuman
      • auth
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
        • default
      • exchange
        • rates
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • quickbooks
            • invoice
      • json
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • recaptcha
      • reports
        • aging
          • invoices
        • custom
          • report
        • invoice
          • creation
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • form
      • html
      • javascript
      • xml
    • lib
  • None
  • PHP

Classes

  • NetGeoIp

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).

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( string $database_file )

Create a new GeoIP instance using the given database file

Create a new GeoIP instance using the given database file

Parameters

$database_file
string
$database_file The full path to the database file
public
# __destruct( )

Attempts to close the open connection to the database file

Attempts to close the open connection to the 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
string
$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
string
$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
string
$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
string
$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
string
$ip The IP address to lookup, if null will use user's IP

Returns

string
The oraganization the IP address belongs to

Magic methods summary

Blesta API documentation generated by ApiGen 2.8.0