Download the PHP package xposedornot/xposedornot-php without Composer
On this page you can find all versions of the php package xposedornot/xposedornot-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xposedornot/xposedornot-php
More information about xposedornot/xposedornot-php
Files in xposedornot/xposedornot-php
Package xposedornot-php
Short Description PHP client library for the XposedOrNot API - check data breaches, email exposures, and password leaks
License MIT
Homepage https://xposedornot.com
Informations about the package xposedornot-php
xposedornot-php
Official PHP SDK for the XposedOrNot API
Check if your email has been exposed in data breaches
Note: This SDK uses the free public API from XposedOrNot.com - a free service to check if your email has been compromised in data breaches. Visit the XposedOrNot website to learn more about the service and check your email manually.
Table of Contents
- Features
- Installation
- Requirements
- Quick Start
- API Reference
- checkEmail
- getBreaches
- breachAnalytics
- checkPassword
- Error Handling
- Rate Limits
- Configuration
- Contributing
- License
- Links
Features
- Simple API - Easy-to-use methods for checking email breaches, browsing breaches, and verifying passwords
- Free and Plus support - Works with the free public API out of the box; add an API key for Plus features
- Detailed Analytics - Get breach details, risk scores, and metrics
- Password Privacy - Passwords are hashed locally with Keccak-512; only a 10-char prefix is sent (k-anonymity)
- Error Handling - Typed exception classes for every failure scenario
- Configurable - Timeout, retries, custom headers, and base URL overrides
- Secure - HTTPS enforced, input validation, no sensitive data transmitted in plaintext
Installation
Requirements
- PHP 8.1 or higher
- Composer
Quick Start
API Reference
Constructor
Methods
checkEmail($email)
Check if an email address has been exposed in data breaches. Uses the free API when no API key is configured; uses the Plus API with detailed results when an API key is set.
getBreaches($domain)
Get a list of all known data breaches, optionally filtered by domain.
Returns: Array of BreachInfo objects with properties such as breachID, domain, exposedData, exposedRecords, breachedDate, and more.
breachAnalytics($email)
Get detailed breach analytics for an email address, including risk scores and metrics.
checkPassword($password)
Check if a password has been exposed in known data breaches. The password is hashed locally using Keccak-512 and only a 10-character prefix of the hash is sent to the API (k-anonymity).
Error Handling
The library provides typed exception classes for different failure scenarios:
Exception Classes
| Exception Class | Description |
|---|---|
XposedOrNotException |
Base exception class for all errors |
ValidationException |
Invalid input (e.g., malformed email address) |
AuthenticationException |
Invalid or missing API key |
NotFoundException |
Resource not found (e.g., email not in any breach) |
RateLimitException |
API rate limit exceeded after retries |
NetworkException |
Network connectivity issues |
ApiException |
General API error |
Rate Limits
The XposedOrNot API has the following rate limits:
- 2 requests per second
- 50-100 requests per hour
- 100-1000 requests per day
The client includes automatic client-side rate limiting (1 request per second for the free API) and retry with exponential backoff (1s, 2s, 4s) for HTTP 429 responses.
Configuration
All configuration is handled through the Configuration class:
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
baseUrl |
string |
'https://api.xposedornot.com' |
Base URL for the free API |
plusBaseUrl |
string |
'https://plus-api.xposedornot.com' |
Base URL for the Plus API |
passwordBaseUrl |
string |
'https://passwords.xposedornot.com/api' |
Base URL for the password API |
timeout |
int |
30 |
Request timeout in seconds |
maxRetries |
int |
3 |
Maximum retry attempts on rate limit (429) |
apiKey |
string\|null |
null |
API key for Plus API access |
headers |
array |
[] |
Custom headers to include in all requests |
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Setup
License
MIT - see the LICENSE file for details.
Links
- XposedOrNot Website
- API Documentation
- Packagist Package
- GitHub Repository
- XposedOrNot API Repository
Made with care by XposedOrNot