PHPackages                             smiirl/smiirl-library-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. smiirl/smiirl-library-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

smiirl/smiirl-library-php
=========================

A composer package to interact with Smiirl Objects

02.2kPHP

Since Jun 1Pushed 3y ago1 watchersCompare

[ Source](https://github.com/smiirl/smiirl-library-php)[ Packagist](https://packagist.org/packages/smiirl/smiirl-library-php)[ RSS](/packages/smiirl-smiirl-library-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Smiirl Library for PHP
======================

[](#smiirl-library-for-php)

The **Smiirl Library for PHP** makes it easy for developers to interact with Smiirl Custom Counters in their PHP code,

Getting Started
---------------

[](#getting-started)

1. **Minimum requirements** – To run the library, your system will need to meet the minimum requirements, including having **PHP &gt;= 7.0**. We highly recommend having it compiled with the cURL extension and cURL 7.16.2+ compiled with a TLS backend (e.g., NSS or OpenSSL).
2. **Install the library** – Using \[Composer\] is the recommended way to install the Smiirl Library for PHP. The library is available via \[Packagist\] under the \[`smiirl/smiirl-library-php`\]\[install-packagist\] package. If Composer is installed globally on your system, you can run the following in the base directory of your project to add the library as a dependency: ```
    composer require smiirl/smiirl-library-php

    ```

How does the Custom Counter works
---------------------------------

[](#how-does-the-custom-counter-works)

A Smiirl Custom Counter could be display a number via 2 methods: JSON &amp; PUSH.

### JSON: output a valid JSON

[](#json-output-a-valid-json)

The JSON method consists in exposing a valid endpoint that the counter will monitor. For instance, if you set the counter to monitor this URL , your counter will display 1. For this method, you need a webserver to host your code.

**Example:**

```
