Simple app for geoip - Lumen GeoIP Service

Overview

Lumen GeoIP Service

Requirements

  • PHP >= 8

Required packages:

Install

Install Composer packages:

composer install

Copy .env file:

cp .env.example .env

You must download the GeoIP database from MaxMind Site and place it in the following path:

/storage/app/GeoLite2-City.mmdb

Also, you can specify the location of the file with the GEOIP database through the GEO_DATABASE_PATH parameter relative to the storage folder.

Specify the locale in which the response from the server will be returned. Where:

APP_LOCALE - standard return locale. Default: en;

FALLBACK_LOCALE - the locale in which the response will be returned if something happened to APP_LOCALE. Default: en;

Usage

You can run this using command:

php -S localhost:8000 -t public

To get GeoIP data, you must make an HTTP request, specifying the IP to check in the GET parameter:

http://localhost:8000/?ip=

You can also pass a specific locale for the response in the desired format via the locale parameter:

http://localhost:8000/?ip=&lang=en

You may not specify the ip parameter, in which case you will receive data for the address from which the request was sent.

After successful completion of the request, you will receive a JSON response with the following parameters:

  • country
  • subdivision
  • city
  • postal_code
  • latitude
  • longitude
You might also like...
A beautiful, fully open-source, tunneling service - written in pure PHP
A beautiful, fully open-source, tunneling service - written in pure PHP

Expose A completely open-source ngrok alternative - written in pure PHP. Documentation For installation instructions, in-depth usage and deployment de

λ Run PHP Coroutines & Fibers as-a-Service on the AWS Lambda.
λ Run PHP Coroutines & Fibers as-a-Service on the AWS Lambda.

λ Swoole Runtime for AWS Lambda Run PHP Coroutines & Fibers as-a-Service on the AWS Lambda. Getting started Create your Lambda function index.php ?ph

Entree ARP service

This is my package entree-arp-service Installation You can install the package via composer: composer require learnkit/entree-arp-service You can publ

Fresns core library: Cross-platform general-purpose multiple content forms social network service software
Fresns core library: Cross-platform general-purpose multiple content forms social network service software

About Fresns Fresns is a free and open source social network service software, a general-purpose community product designed for cross-platform, and su

Composer as a service
Composer as a service

Composer as a service What is it? Originally the idea came from @pgodel Having some issue with little instances or slow connection, I decided to make

Phalcon PHP Meta tags Service

About Phalcon meta tags plugin for PhalconPHP. This plugin allows you to easily and flexibly customize the meta tags of your view. If this plugin help

Sends log messages to the Logentries log management service

Phalcon Logentries Phalcon library to connect and make log entries using Logentries. You can adapt it to your own needs or improve it if you want. Ple

Making phone calls with PHP and Twilio Voice Service.

TwilioVoice-PHP This is an example implementation of Twilio's phone call API. You can clone this code to your project: git clone https://github.com/P

Magento 2 module for ngrok.io service support

Magento 2 ngrok Magento 2 module for ngrok service support. Automatically updates Magento base url based on domain used in the request. Modifies full-

Owner
Artem Bakulin
⚡Developer from Siberia!
Artem Bakulin
Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.

TARS - A Linux Foundation Project TARS Foundation Official Website TARS Project Official Website WeChat Group: TARS01 WeChat Offical Account: TarsClou

THE TARS FOUNDATION PROJECTS 9.6k Jan 1, 2023
Get mobile app version and other related data from Google Play Store, Apple App Store and Huawei AppGallery

Mobile App Version Get mobile app version and other related data from Google Play Store, Apple App Store and Huawei AppGallery. Installation Add to co

Omer Salaj 11 Mar 15, 2022
This is an example app demonstrating how to deploy a php app to runway.

Runway Example php App This is an example app demonstrating how to deploy a php app to runway. clone this repo, and navigate into that directory runwa

Planetary Quantum GmbH 0 Aug 9, 2022
HTMX example app that demonstrates how to use HTMX to add javascript interactivity to a serverside rendered PHP app

HTMX examle app This demo app demonstrates how to use HTMX to transform a server side rendered PHP app into a more 'interactive' app with AJAX request

Alexander Morland 3 Dec 11, 2022
It is an open-source and free project, which is faced with the drawing lovers, providing a free and simple Gallery service

It is an open-source and free project, which is faced with the drawing lovers, providing a free and simple Gallery service

WeepingDogel 5 Dec 15, 2022
A simple plugin that replaces the sms channel with Whatsapp Web channel through Wo-Wa Whatsapp service

Mautic Whatsapp Plugin This plugin replaces the SMS channel and allows you to send messages to Whatsapp using the Wo-Wa Whatsapp Web application. Inte

Joey Keller 9 Dec 16, 2022
Hprose RPC 服务 in Laravel/Lumen

基于 hprose/hprose-php 开发的Laravel扩展:whereof/laravel-hprose

wangzhiqiang 6 Mar 18, 2022
📈 Get insights about your Laravel or Lumen Project

Laravel Stats Get insights about your Laravel or Lumen Project. Installing The easiest way to install the package is by using composer. The package re

Stefan Zweifel 1.6k Dec 30, 2022
Lumen on Docker - Skeleton project with Nginx, MySQL & PHP 8 | Aws ECS, Google Kubernates, Azure Container Engine

Docker infrastructure for Lumen Description Microservice Lumen is a starting skeleton based on Docker and Lumen Framework. This project helps to devel

Fabrizio Cafolla 218 Sep 25, 2022
urldecode'ing of all HTTP parameters in Lumen project

Request UrlDecode Description This package is intended to perform urldecode of all HTTP parameters in Lumen project. Lumen for some reason does not do

null 1 Dec 13, 2021