Download the PHP package lounisbou/cell-location without Composer

On this page you can find all versions of the php package lounisbou/cell-location. 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 cell-location

Cell Location API Integration

This project provides a service to determine the location (latitude and longitude) based on mobile cell tower information (MCC, MNC, LAC, CellID) using various APIs, such as:

It can uses triangulation and enclosing circle algorithms to estimate the possible position of a device based on data from multiple cell towers.

Table of Contents


Installation

Prerequisites

Clone the repository

Install dependencies

Configuration

Before using the project, you need to configure environment variables for API keys. You can do this by creating a .env file in the project root.

Example .env file

Loading Environment Variables

The project uses the Symfony Dotenv component to load environment variables. These environment variables are automatically loaded via the Pest.php file during tests or when running the project.

Regenerating Autoloader

Ensure your classes are autoloaded by Composer. If you add or modify any classes, make sure to run:

Usage

This project allows you to fetch the location from different services by simply providing cell tower information like MCC, MNC, LAC, and CellID.

Example Usage

Key Concepts

Get CellLocation from CellData

Get triangulated CellLocation from multiple CellData

Advanced Features

Haversine Distance Calculation: Uses the Haversine formula to calculate distances between latitude and longitude points on Earth, which accounts for the Earth's curvature. Error Handling: Proper handling of cases where circles do not intersect or input data is insufficient.

Limitations

This version uses an approximate method for finding the intersection of circles. For higher precision, computational geometry algorithms can be implemented, though they may require more complex libraries. The algorithm assumes that all circles must intersect. If they don't, the program throws an error.

Services Supported

Running Tests

This project uses Pest for testing.

To run the tests, including those for error handling and success responses, use the following command:

Future Improvements

Contributing

If you wish to contribute to this project:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add your feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Contact

If you have any questions or run into issues, feel free to open an issue.



All versions of cell-location with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
lounisbou/php-distance Version ^1.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 lounisbou/cell-location contains the following files

Loading the files please wait ....