Download the PHP package kilden/kilden-php without Composer

On this page you can find all versions of the php package kilden/kilden-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 kilden-php

Kilden PHP SDK

Packagist ci

Server-side PHP SDK for Kilden, the open customer data platform: events, identity verification and feature flags from your backend. PHP 7.4+, zero dependencies — it runs on the shared hosting your WordPress client lives on and on your Laravel 13 app alike.

That is a complete, working integration: events queue in memory and flush in batches (20 events or 10 seconds, whichever comes first), with gzip, retries with backoff, and a shutdown hook that delivers whatever is left after your response is sent — under FPM it runs after fastcgi_finish_request(), so telemetry never adds latency your user can feel.

Use the secret key (sk_), never the public one. Events sent with the secret key are source=server, verified=true — facts your campaigns and revenue reports can trust. The constructor rejects public (wk_) keys outright. Keep the secret key out of browsers, mobile apps, and frontend bundles of any kind.

Identity verification

Anyone can open a browser console and send events as user_id=ceo@corp — unless you turn on identity verification. Your backend signs a short-lived token vouching for the logged-in user; Kilden's web SDK attaches it, and the platform marks those events verified. Signing is the part only your backend can do, and it is three lines:

Only sign a sub your backend authenticated. Signing request input — $signer->sign($_POST['user_id']) — lets anyone impersonate anyone, with a "verified" stamp on top. Sign $user->id after your auth layer resolved it, never before.

Traits passed to sign() become signed traits: during enrichment they win over any unsigned traits the browser claims for the same event.

Feature flags

getFeatureFlag returns false, true, or the variant key as a string. Evaluation is remote against /decide with a 30-second in-memory cache per distinct_id; calls with person_properties bypass the cache. When Kilden cannot answer within timeout (default 3s), you get your default back — one attempt, no retries, your request never blocks on a flag.

Batching, flush and shutdown

Events do not hit the network on every track(). They queue in memory and flush when the queue reaches flush_at (default 20), when flush_interval elapses on a long-running process, or when you say so:

Call close() at the end of CLI scripts and workers. Under FPM you can skip it: a register_shutdown_function hook flushes after the response is handed off. If the process dies before any flush path runs (kill -9, fatal at the wrong instant), queued events are lost — that is the documented trade-off of in-memory batching; anything stricter needs a persistent queue on your side.

The queue is bounded (max_queue_size, default 10 000). When full, the newest event is dropped and counted; $kilden->droppedCount() tells you how many events were lost to a full queue, invalid input or exhausted retries.

Options

The constructor throws on misconfiguration (missing key, public key, no transport available) — fail at boot, not at 3am. After construction the SDK never throws: invalid input is dropped and logged, and delivery failures degrade to dropped batches, never to exceptions in your request path.

No ext-curl? The SDK falls back to stream wrappers automatically, and you can inject any Kilden\Transport\Transport implementation (that is how the WordPress plugin routes through wp_remote_post()).

Laravel

The kilden/laravel package wraps this SDK for Laravel 11–13: config file, Kilden facade, queued delivery, and the POST /kilden/identity endpoint the web SDK refreshes its tokens against.

With KILDEN_QUEUE=true, event calls dispatch a Horizon/queue job instead of sending inline. Kilden::fake() gives you a spy with assertTracked() for your test suite.

Spec

This SDK implements the Kilden server SDK specification (spec version 0.1) and runs its frozen test vectors — including byte-exact identity token signatures — against the shared mock capture server in CI. Behavior changes land in the spec first, then here.

Community

License

MIT


All versions of kilden-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
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 kilden/kilden-php contains the following files

Loading the files please wait ...