Download the PHP package subarist/waterhole-geoip without Composer

On this page you can find all versions of the php package subarist/waterhole-geoip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package waterhole-geoip

Waterhole GeoIP

A GeoIP extension for Waterhole.

Status: Development Tested with: Waterhole 0.7, Waterhole 0.8

Features

Requirements

Installation

Install the extension with Composer:

Run the database migrations:

Then clear the application cache:

If the site is running under Laravel Octane, reload the workers:

Configuration

The extension can be configured through environment variables in .env.

Default configuration

No additional environment variables are required.

When no provider is explicitly configured, the extension automatically selects:

To explicitly use IP-API Free:

IP-API Free

IP-API Free does not require an API token.

The extension uses:

Only the country code is requested.

IPinfo

To use IPinfo, provide an IPinfo API token:

The extension uses the IPinfo Lite API to resolve the country code.

When IPinfo is configured as the active provider, the IPinfo attribution is displayed in the user's privacy settings.

Provider selection

The active provider can be selected with:

or:

If GEOIP_PROVIDER is not set, the provider is selected automatically based on whether IPINFO_TOKEN is configured.

Example: IP-API Free

Example: IPinfo

After changing .env, clear the configuration cache:

If Laravel Octane is enabled, reload the workers:

User privacy setting

Users can control whether their posting country flag is displayed.

The setting is available in the user's profile/privacy settings as:

IP Flag

Show the flag of the country I posted from, based on my IP address

The setting is enabled by default.

When disabled, the country flag is not displayed for that user's posts.

IP data storage

The extension stores the original public IP address separately from the resolved country information.

content_ip

Associates a post or comment with the IP address used to create it.

ip_info

Stores the GeoIP result for each unique IP address.

The GeoIP provider is only queried when an IP address does not already have a corresponding entry in ip_info.

This prevents repeated API requests for the same IP address.

Public IP addresses only

Private and reserved IP addresses are not sent to the GeoIP provider.

The extension validates IP addresses using:

Local, private, and reserved addresses are therefore ignored.

GeoIP provider failures

GeoIP lookup failures do not prevent users from creating posts or comments.

If the provider:

the post or comment is still created normally.

The country flag is simply unavailable until valid GeoIP information becomes available.

Country flags

Country flags are generated from the two-letter ISO country code returned by the GeoIP provider.

Examples:

The flag image uses Waterhole's configured emoji CDN.

Configuration reference

The extension configuration file is:

Default configuration:

Privacy considerations

The extension stores the IP address associated with posts and comments in the database.

Administrators should ensure that their forum's privacy policy and applicable laws permit the collection and storage of IP addresses.

When a new IP address needs to be resolved, the public IP address may be sent to the configured GeoIP provider.

No GeoIP request is made when the IP address has already been resolved and cached in ip_info.

License

See the license included with this extension.


All versions of waterhole-geoip with dependencies

PHP Build Version
Package Version
Requires waterhole/core Version ^0.7.0 || ^0.8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package subarist/waterhole-geoip contains the following files

Loading the files please wait ...