Download the PHP package joshghent/loginllama without Composer

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

LoginLlama PHP Client

Official PHP SDK for LoginLlama - AI-powered login security and fraud detection.

Features

Installation

Requires PHP 8.3 or higher.

Quick Start

Vanilla PHP

The simplest way to use LoginLlama in vanilla PHP - IP and User-Agent are automatically detected from $_SERVER:

With Request Object

If you have a framework request object, you can pass it explicitly:

Manual Override

Or provide IP and User-Agent manually:

Framework Examples

Laravel

Symfony

WordPress

API Reference

new LoginLlama($apiKey, $baseUrl = null)

Create a new LoginLlama client.

Parameters:

$loginllama->check($identityKey, $options = [])

Check a login attempt for suspicious activity.

Parameters:

Returns: Associative array

Detection Priority:

  1. Explicit 'ipAddress' and 'userAgent' in options array
  2. Extract from 'request' object if provided
  3. Use stored context from middleware (if used)
  4. Fallback to $_SERVER superglobal

Examples:

$loginllama->middleware()

Returns middleware callable for Laravel/Symfony that automatically captures request context.

Laravel Middleware:

Symfony Event Subscriber:

LoginLlama::verifyWebhookSignature($payload, $signature, $secret)

Verify webhook signature using constant-time HMAC comparison.

Parameters:

Returns: bool

Login Status Codes

The SDK provides constants for all possible status codes:

Error Handling

The SDK will throw \Exception if required parameters are missing:

Best Practice: Fail open on errors to avoid blocking legitimate users during API outages:

IP Detection

The SDK automatically detects IP addresses from multiple sources with priority fallback:

  1. HTTP_X_FORWARDED_FOR - Parses chain, takes first public IP (filters private IPs)
  2. HTTP_CF_CONNECTING_IP - Cloudflare real client IP
  3. HTTP_X_REAL_IP - nginx proxy header
  4. HTTP_TRUE_CLIENT_IP - Akamai/Cloudflare header
  5. REMOTE_ADDR - Direct connection IP

Private IP Filtering: Automatically filters 10.x.x.x, 172.16-31.x.x, 192.168.x.x, 127.x.x.x, ::1, fc00::/7, fe80::/10

Environment Variables

You can set your API key as an environment variable:

Then initialize without arguments:

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

GNU GPL v3

Support


All versions of loginllama with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3.0
ext-curl 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 joshghent/loginllama contains the following files

Loading the files please wait ...