Download the PHP package elvesora/domain-lookup-php without Composer

On this page you can find all versions of the php package elvesora/domain-lookup-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package domain-lookup-php

Elvesora Domain Lookup for PHP

A framework-independent PHP client for resolving a company name to its official domain with the Elvesora Company Domain Lookup API.

Requirements

Obtain and manage the key through the Company Domain Lookup documentation. Keep it in server-side configuration; never expose it in browser or mobile client code.

Installation

Quick start

The package does not load a .env file. If your application uses a dotenv library or framework environment loader, initialize it before reading the key and constructing the client.

A not-found lookup is a successful API result: found is false, domain is null, and confidence is 0.

companyName must be non-empty and no longer than 255 characters. Optional additionalContext is trimmed, treats an empty string as absent, and cannot exceed 2,000 characters. The client rejects invalid local input before sending an HTTP request, so those local failures consume no lookup credit.

To validate the API key without consuming lookup allowance:

Result fields

DomainLookupResult exposes readonly properties for:

Use $result->toArray() or json_encode($result) when an array or JSON payload is more convenient.

Errors

Exception reference

Exception When it is thrown
\InvalidArgumentException Empty or invalid local configuration, lookup input, or request ID; no HTTP request is sent.
AuthenticationException The API returns HTTP 401 for an invalid or revoked key.
ValidationException The API returns HTTP 422. Use errors() for field-level validation messages.
UsageLimitException The API returns HTTP 429. Use limit() and remaining() for available quota metadata.
ApiException The API returns another non-success HTTP response.
InvalidResponseException The API response is not valid JSON, is not a JSON object, or violates the expected result contract.
TransportException The HTTP client cannot complete the request because of a connection, DNS, TLS, or similar transport failure.

All SDK exceptions extend DomainLookupException. It exposes readonly statusCode, errorType, retryable, retryAfter, responseBody, and requestId properties. Constructor and local input failures use PHP's native \InvalidArgumentException instead. API keys are never added to exception messages.

Configuration

The default customer endpoint is https://prospecting.elvesora.com/api/prospecting/company. HTTP and HTTPS custom base URLs are accepted so local and test environments can use the same client.

Timeout values are seconds and must be greater than zero. connectTimeout is capped internally at the total timeout. A custom base URL must be an absolute HTTP or HTTPS URL with a host and cannot contain embedded credentials, a query string, or a fragment. The user agent must be a non-empty string.

You may pass a custom Guzzle client as the second constructor argument. This is useful for shared handlers, proxies, observability middleware, and deterministic tests.

Request IDs

Every lookup sends an X-Request-Id. The client generates one by default, or you can propagate your own trace identifier:

The response request ID is available on the result and all SDK exceptions.

A custom request ID must be 8 to 128 characters and may contain only letters, numbers, dots, underscores, colons, and hyphens. The SDK throws InvalidArgumentException before the request when a custom value is invalid. When no value is supplied, the SDK generates a valid identifier automatically.

Retries and credits

The client does not retry automatically. Local validation failures do not reach the API and consume no credit. After an authenticated lookup passes the usage-limit check, completed matches, no-match results, cached results, server-side validation errors, and retryable 502 or 503 responses consume one credit. A request blocked with HTTP 429 consumes no credit. X-Request-Id is a tracing value rather than an idempotency key; inspect retryable and retryAfter, then make any retry decision explicitly.

Development

The test suite uses mocked HTTP responses and sends no requests to the live Elvesora API.

License

MIT. See LICENSE.


All versions of domain-lookup-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.9 || ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package elvesora/domain-lookup-php contains the following files

Loading the files please wait ...