Releases: ipregistry/ipregistry-php
Releases · ipregistry/ipregistry-php
Release list
v1.0.0
Added
- Initial release of the official PHP client library for the Ipregistry API.
IpregistryClient::lookup()for single IP address lookups,lookupOrigin()for origin (requester) lookups
returning parsed User-Agent data, andlookupBatch()for resolving many IP addresses at once. Batch lookups
transparently split arrays larger than the API's 1024-address limit into several requests (configurable via the
maxBatchSizeargument) and reassemble results in input order.IpregistryClient::parseUserAgents()for parsing raw User-Agent strings into structured data.- Batch results (
IpInfoList,UserAgentList) expose per-entry success or failure viaat()and standard
Countable/IteratorAggregateiteration. - Configuration through named constructor arguments: base URL, timeout, retries, retry interval, retry-on-5xx,
retry-on-429, batch size, cache, cache TTL, User-Agent, and HTTP transport. - Lookup options as named method arguments:
fields,hostname, and free-formparams. - Optional caching through any PSR-16 cache, plus a bundled
InMemoryCachewith LRU eviction and TTL. Caching is
disabled by default; origin lookups are never cached and batch lookups reuse cached entries. - Automatic retries with exponential backoff for transient network errors and 5xx responses, honoring the
Retry-Afterheader. Retries on 429 Too Many Requests are disabled by default. - Typed errors:
ApiException(with raw code and typedErrorCodeenum) andClientException, both extending
IpregistryException. - Readonly, fully typed response models with
IpType,CompanyType, andConnectionTypeenums. - Pluggable HTTP layer: a zero-dependency cURL transport by default, a PSR-18 adapter (
Psr18Transport), and the
TransportInterfaceextension point. UserAgents::isBot()helper to skip lookups for crawler traffic.- Offline unit/behavior tests using PHP's built-in development server, plus opt-in live system tests in a dedicated
PHPUnit test suite (run withIPREGISTRY_API_KEYset).