Download the PHP package generatorlabs/sdk without Composer
On this page you can find all versions of the php package generatorlabs/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download generatorlabs/sdk
More information about generatorlabs/sdk
Files in generatorlabs/sdk
Package sdk
Short Description A PHP wrapper for the Generator Labs API
License MIT
Homepage https://generatorlabs.com
Informations about the package sdk
Generator Labs PHP SDK
The official PHP SDK for the Generator Labs API v4.0.
Table of Contents
- Features
- Prerequisites
- Installation
- Quick Start
- RBL Monitoring
- List Hosts
- Get a Single Host
- Create a New Host
- Update a Host
- Delete a Host
- Pause/Resume a Host
- Start a Manual RBL Check
- Manage RBL Profiles
- Manage RBL Sources
- Contact Management
- Manage Contacts
- Manage Contact Groups
- Certificate Monitoring
- List Certificate Errors
- Manage Certificate Monitors
- Manage Certificate Profiles
- Pagination
- Webhook Verification
- Rate Limiting
- API Structure
- Development
- Release History
- Contributing
- Support
- License
Features
- Full support for Generator Labs API v4.0
- Automatic retry logic with exponential backoff and
Retry-Afterheader support - Configurable timeouts and retry behavior
- Automatic pagination support for large result sets
- RESTful endpoint design with proper HTTP verbs (GET, POST, PUT, DELETE)
- RBL and DNSBL monitoring
- Contact and contact group management
- Manual RBL checks
- Monitoring profiles and sources
- Type-safe with PHP 8.1+ strict types
- PHPStan level 8 static analysis
- Guzzle HTTP client with connection pooling
- PSR-4 autoloading
Prerequisites
Before using this library, you must have:
- A Generator Labs account - Sign up or Login
- Valid API credentials (Account SID and Auth Token) from the Portal
- PHP >= 8.1
- The PHP JSON extension
- Guzzle HTTP client (automatically installed via Composer)
Installation
Install via Composer:
Quick Start
Initialize the Client
RBL Monitoring
List Hosts
Get a Single Host
Create a New Host
Update a Host
Delete a Host
Pause/Resume a Host
Start a Manual RBL Check
Manage RBL Profiles
Manage RBL Sources
Contact Management
Manage Contacts
Manage Contact Groups
Certificate Monitoring
Certificate monitoring allows you to monitor SSL/TLS certificates for expiration, validity, and configuration issues across HTTPS, SMTPS, IMAPS, and other TLS-enabled services.
List Certificate Errors
Manage Certificate Monitors
Manage Certificate Profiles
Pagination
List endpoints return paginated results. You can manually pass page and page_size parameters, or use the getAll() helper to automatically fetch every page and return a flat array of all items:
The getAll() method is available on all list endpoints:
$client->rbl->hosts->getAll()$client->rbl->profiles->getAll()$client->rbl->sources->getAll()$client->rbl->listings->getAll()$client->contact->contacts->getAll()$client->contact->groups->getAll()$client->cert->monitors->getAll()$client->cert->profiles->getAll()$client->cert->errors->getAll()
Webhook Verification
The SDK includes a helper for verifying incoming webhook signatures. Each webhook is assigned a signing secret (available in the Portal), which is used to compute an HMAC-SHA256 signature sent with every request in the X-Webhook-Signature header.
The default timestamp tolerance is 5 minutes. You can customize it (in seconds), or pass 0 to disable:
See examples/webhook-verification.php for a complete example.
API Documentation
Full API documentation is available at the Generator Labs Developer Site.
Rate Limiting
The API enforces two layers of rate limiting:
- Hourly limit: 1,000 requests per hour per application
- Per-second limit: varies by endpoint — 100 RPS for read operations, 50 RPS for write operations, and 20 RPS for manual check start
When a rate limit is exceeded, the API returns HTTP 429 with a Retry-After header indicating how many seconds to wait. The SDK automatically respects this header during retries, falling back to exponential backoff for other retryable errors.
All API responses include IETF draft rate limit headers, accessible via the rate_limit property on every response:
| Header | Description | Example |
|---|---|---|
RateLimit-Limit |
Active rate limit policies | 1000;w=3600, 100;w=1 |
RateLimit-Remaining |
Requests remaining in the most restrictive window | 95 |
RateLimit-Reset |
Seconds until the most restrictive window resets | 1 |
API Structure
The v4.0 API follows a RESTful design with three main resource namespaces:
RBL Namespace ($client->rbl)
- hosts - List, get, create, update, delete, pause, and resume hosts
- listings - Get currently listed hosts
- check - Start manual checks and get status
- profiles - List, get, create, update, and delete monitoring profiles
- sources - List, get, create, update, delete, pause, and resume RBL sources
Contact Namespace ($client->contact)
- contacts - List, get, create, update, delete, pause, resume, confirm, and resend contacts
- groups - List, get, create, update, and delete contact groups
Certificate Namespace ($client->cert)
- errors - List certificate errors and get specific error details
- monitors - List, get, create, update, delete, pause, and resume certificate monitors
- profiles - List, get, create, update, and delete certificate monitoring profiles
Development
Running Tests
Running Static Analysis
Running All Quality Checks
Release History
v2.0.1 (2026-06-19)
- Error detection now reads the API
status_codeandstatus_message; anystatus_code(or HTTP status) of 400 or greater throwsExceptionwith the API message and the code viagetCode()
v2.0.0 (2026-01-31)
- Complete rewrite for Generator Labs API v4.0
- RESTful endpoint design with proper HTTP verbs
- Updated to use Generator Labs branding (formerly RBLTracker)
- Minimum PHP version bumped to 8.1
- Added full PHPUnit test coverage
- Added PHPStan static analysis
- Added GitHub Actions CI/CD workflow
- Organized endpoints under
/rbl/,/contact/, and/cert/namespaces - Added support for PUT and DELETE methods
- Improved error handling for v4.0 response format
- Automatic
Retry-Afterheader support on 429 rate limit responses Responsewrapper (ArrayAccess) exposes per-request rate limit info (rate_limit)- Added
RateLimitInfoclass withlimit,remaining, andresetproperties - Webhook signature verification with HMAC-SHA256 and constant-time comparison
- Automatic pagination via
getAll()for large result sets
v1.1.0
- Updated to use the new API endpoint URL
- Added strict type requirements; bumped minimum version to PHP 7.4
- Added support for Monitoring Profiles
- Added support for the ACLs endpoint
v1.0.3
- Fixed typo in exception class
- Changed array() to []
- Updated classes to use final keyword
v1.0.2
- Updated to support API v3.6
- Added manual RBL check support
- Refactored code layout
v1.0.1
- Updated to support API v3.4
v1.0.0
- Initial release
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For questions, issues, or feature requests:
- GitHub Issues: https://github.com/generator-labs/php-sdk/issues
- Email: [email protected]
- Documentation: https://docs.generatorlabs.com
License
This library is released under the MIT License. See LICENSE for details.