Download the PHP package anura/anura-sdk-php without Composer

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

Anura SDK for PHP

The Anura SDK for PHP makes it easy for developers to access Anura Direct within their PHP code, and begin analyzing their traffic. You can get started in minutes by installing the SDK with Composer, or by downloading a single zip or phar file from our latest release.

Getting Started

  1. Have an open active account with Anura - You can see more about Anura's offerings here.
  2. Minimum Requirements - To use the SDK, you will need PHP >=7.4.
    • If you're looking to install the SDK without Composer, see the Alternative Installation Methods section below.
  3. Install the SDK - Using Composer is the easiest and recommended way to install it. The SDK is available on Packagist. If Composer is installed globally on your system, you can run the following command in the base directory of your project to add the SDK as a dependency:

  4. Using the SDK - The best way to start getting familiar with the SDK is to have a look at our Quick Examples section which covers the most common use-cases for it.

Alternative Installation Methods

Installing via PHAR

  1. Download the PHAR from our latest release, and place it within your project.
  2. Require or include the anura-sdk-php.phar file within your project.
  3. You're good to go!

Installing via ZIP Archive

  1. Download anura-sdk-php.zip from our latest release, extract it, and place anura-sdk-php/ within your project.
  2. Require or include our autoloader at anura-sdk-php/autoload.php
  3. You're good to go!

Quick Examples

Create the Anura Direct client

Set additional data for Anura Direct

Updating elements of additional data

Removing an element of additional data

Create a DirectRequest object for AnuraDirect client

Get a result from Anura Direct

API Reference

AnuraDirect

Can get results from Anura Direct. These results are fetched using Direct's /direct.json API endpoint.

Methods

getResult(DirectRequest $request): DirectResult

getInstance(): string

setInstance(string $instance): void

AdditionalData

A class representing Additional Data for Anura Direct.

addElement(int $key, string $value): void

removeElement(int $key): void

size(): int

__toString(): string

DirectRequestBuilder

A builder class for creating a DirectRequest.

build(): DirectRequest

setSource(string $source): DirectRequestBuilder

setCampaign(string $campaign): DirectRequestBuilder

setIpAddress(string $ipAddress): DirectRequestBuilder

setUserAgent(string $userAgent): DirectRequestBuilder

setApp(string $app): DirectRequestBuilder

setDevice(string $device): DirectRequestBuilder

setAdditionalData(AdditionalData $additionalData): DirectRequestBuilder

DirectRequest

An object that represents an Anura Direct API request.

getSource(): ?string

setSource(string $source): void

getCampaign(): ?string

setCampaign(string $campaign): void

getIpAddress(): string

setIpAddress(string $ipAddress): void

getUserAgent(): ?string

setUserAgent(string $userAgent): void

getApp(): ?string

setApp(string $app): void

getDevice(): ?string

setDevice(string $device): void

getAdditionalData(): ?AdditionalData

setAdditionalData(AdditionalData $additionalData): void

DirectResult

The result upon a successful call to getResult() from the AnuraDirect client. It contains not only the result from Anura Direct, but some other methods to help you use the result.

Methods

isSuspect(): bool

isNonSuspect(): bool

isMobile(): bool

getResult(): string

getRuleSets(): ?array

getInvalidTrafficType: ?string


All versions of anura-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
guzzlehttp/guzzle Version ^7.9
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 anura/anura-sdk-php contains the following files

Loading the files please wait ...