PHPackages                             ipregistry/ipregistry-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ipregistry/ipregistry-php

ActiveLibrary[API Development](/categories/api)

ipregistry/ipregistry-php
=========================

Official PHP client library for the Ipregistry IP geolocation and threat data API.

v1.0.0(1w ago)0651Apache-2.0PHP &gt;=8.2

Since Jul 3Compare

[ Source](https://github.com/ipregistry/ipregistry-php)[ Packagist](https://packagist.org/packages/ipregistry/ipregistry-php)[ Docs](https://ipregistry.co)[ RSS](/packages/ipregistry-ipregistry-php/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (7)Versions (2)Used By (1)

[![Ipregistry](https://camo.githubusercontent.com/6351676fbebd87b54ff50f3b2fae63bc9bdb30471cf42a5e15b8a0407872124c/68747470733a2f2f63646e2e697072656769737472792e636f2f69636f6e732f66617669636f6e2d39367839362e706e67)](https://ipregistry.co/)

Ipregistry PHP Client Library
=============================

[](#ipregistry-php-client-library)

[![License](https://camo.githubusercontent.com/55252c8bdb8cce91195de72acc8ada6436f3ce1971d3e113bf281cf411acbfd7/687474703a2f2f696d672e736869656c64732e696f2f3a6c6963656e73652d6170616368652d626c75652e737667)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/962fbf4a4bf8e1ed9ae01a12500cd66c04ff2b02cbc316ecaee6a731ac7adb53/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f697072656769737472792f697072656769737472792d706870)](https://packagist.org/packages/ipregistry/ipregistry-php)[![CI](https://github.com/ipregistry/ipregistry-php/actions/workflows/ci.yml/badge.svg)](https://github.com/ipregistry/ipregistry-php/actions/workflows/ci.yml)[![Lint](https://github.com/ipregistry/ipregistry-php/actions/workflows/lint.yml/badge.svg)](https://github.com/ipregistry/ipregistry-php/actions/workflows/lint.yml)

This is the official PHP client library for the [Ipregistry](https://ipregistry.co) IP geolocation and threat data API, allowing you to look up your own IP address or specified ones. Responses return multiple data points including carrier, company, currency, location, time zone, threat information, and more. The library can also parse raw User-Agent strings.

The library builds on the PHP standard library and the cURL extension, with PSR-16 (caching) and optional PSR-18 (HTTP client) interoperability.

Getting Started
---------------

[](#getting-started)

You'll need an Ipregistry API key, which you can get along with 100,000 free lookups by signing up for a free account at .

### Installation

[](#installation)

```
composer require ipregistry/ipregistry-php
```

Requires PHP 8.2 or later with the `curl` and `json` extensions.

### Quick start

[](#quick-start)

#### Single IP lookup

[](#single-ip-lookup)

```
