Download the PHP package eegusakov/geo-search without Composer

On this page you can find all versions of the php package eegusakov/geo-search. 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 geo-search

Geo Search

GitHub GitHub code size in bytes CI PHP Version Requirement

Language: ENG, RUS

Geo Search - PHP library that will allow you to determine the geographical location of an object based on the transmitted data.

Third-party service APIs are used for the search, so the input data for the search may differ depending on the service. The entire list of available services is listed below.

Compatible with PSR

Any client compatible with PSR-18 is suitable for providing http requests. The examples will use the library Guzzle

Any client compatible with PSP-16 is suitable for working with the cache. The examples will use libraries SymfonyCache

Any client compatible with PSR-3 is suitable for error logging (Monolog and so on.). The examples will use the ConsoleLogger included in the current library.

Getting started

Installing Geo Search

The recommended way to install Geo Search is via Composer.

Services

Attention, to work with each service, you need to get an API access token. To get it, follow the link attached to a specific service

1. WeatherApi

Link to the service: https://www.weatherapi.com/my/

Link to documentation: https://www.weatherapi.com/api-explorer.aspx#tz

Performs a search on the following data:

  1. US postal code,
  2. UK postal code,
  3. postal code of Canada,
  4. IP address,
  5. latitude/longitude (decimal degree),
  6. name of the city;

Example:

2. OpenMeteo

Link to the service: https://open-meteo.com/

Link to documentation: https://open-meteo.com/en/docs/geocoding-api

Performs a search on the following data:

  1. name of the city,
  2. postal code;

Example:

Additional features

1. Using multiple services at once

This library allows you to use several services at once and get the result of the first service that returned a non-empty response.

2. The ability to ignore errors

The functionality is relevant when there is a need to ignore errors and move on to the next request.

ErrorHandler processes all errors and writes them to the log, the library includes a basic logger that simply outputs information to the console (ConsoleLogger).

Any client compatible with PSR-3 is suitable for logging.

3. Ability to cache the response result

Any client compatible with PSP-16 is suitable for working with the cache. The example will use SymfonyCache.

4. The ability to combine the 1st, 2nd and 3rd item

Cooperation

Please read CONTRIBUTING for more information about our code of conduct and the process of sending us merge requests.

License

This project is licensed under the MIT license - see the LICENSE file for details


All versions of geo-search with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
psr/http-client Version ^1.0
psr/simple-cache Version ^3.0
psr/log Version ^3.0
laminas/laminas-diactoros Version ^3.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 eegusakov/geo-search contains the following files

Loading the files please wait ...