PHPackages                             klangoo/magnetapiclient.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. [API Development](/categories/api)
4. /
5. klangoo/magnetapiclient.php

ActiveLibrary[API Development](/categories/api)

klangoo/magnetapiclient.php
===========================

Magnet API Client for PHP

1.0.0(7y ago)0171MITPHPPHP &gt;=5.3

Since Aug 29Pushed 4y agoCompare

[ Source](https://github.com/Klangoo/MagnetApiClient.PHP)[ Packagist](https://packagist.org/packages/klangoo/magnetapiclient.php)[ Docs](https://github.com/Klangoo/MagnetApiClient.PHP)[ RSS](/packages/klangoo-magnetapiclientphp/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

**This library allows you to easily use the Magnet API via PHP.**

Table of Contents
=================

[](#table-of-contents)

- [About](#about)
- [Installation](#installation)
- [Usage](#usage)

About
=====

[](#about)

Klangoo NLP API is a natural language processing (NLP) service that uses the rule-based paradigm and machine learning to recognize the aboutness of text. The service recognizes the category of the text, extracts key disambiguated topics, places, people, brands, events, and 41 other types of names; analyzes text using tokenization, parts of speech, parsing, word sense disambiguation, named entity recognition; and automatically finds the relatedness score between documents.

[Read More](https://klangoosupport.zendesk.com/hc/en-us/categories/360000812171-Klangoo-Natural-Language-API).

[Signup for a free trail](https://connect.klangoo.com/pub/Signup/)

Installation
============

[](#installation)

Prerequisites
-------------

[](#prerequisites)

- This library is compatible with PHP version 5.3 and later.
- An API Key Provided by [Klangoo](https://klangoosupport.zendesk.com/hc/en-us/articles/360015236872-Step-2-Registering-to-Klangoo-NLP-API)
- An API Secret Provided by [Klangoo](https://klangoosupport.zendesk.com/hc/en-us/articles/360015236872-Step-2-Registering-to-Klangoo-NLP-API)

Install
-------

[](#install)

### With composer (Recommended)

[](#with-composer-recommended)

Install the package via [Composer](https://getcomposer.org/doc/00-intro.md):

```
composer require klangoo/magnetapiclient.php
```

### Without composer

[](#without-composer)

If you don't use Composer, you can download the [package](https://github.com/Klangoo/MagnetApiClient.PHP/archive/master.zip) and include it in your code.

```
require_once 'MagnetApiClient.PHP-master/klangooclient.php';
```

Usage
=====

[](#usage)

This quick start tutorial will show you how to process a text.

Initialize the client
---------------------

[](#initialize-the-client)

To begin, you will need to initialize the client. In order to do this you will need your API Key **CALK** and **Secret Key**. You can find both on [your Klangoo account](https://connect.klangoo.com/).

```
// composer autoload
require __DIR__ . '/vendor/autoload.php';

// if you are not using composer
// require_once 'path/to/klangooclient.php';

use KlangooClient\MagnetAPIClient;

$ENDPOINT = "https://nlp.klangoo.com/Service.svc";
$CALK = "enter your calk here";
$SECRET_KEY = "enter your secret key here";

$client = new MagnetAPIClient($ENDPOINT, $CALK, $SECRET_KEY);

$request = array("text" => "Real Madrid transfer news",
                 "lang" => "en",
                 "format" => "json");

$json = $client->CallWebMethod("ProcessDocument", $request, "POST");
```

Known Issues/Fixes
------------------

[](#known-issuesfixes)

### Curl SSL certificate problem

[](#curl-ssl-certificate-problem)

#### Error:

[](#error)

Curl error: SSL certificate problem: unable to get local issuer certificate

#### Solution:

[](#solution)

1. Download certificate bundle [cacert.pem](https://curl.se/ca/cacert.pem)
2. Add/Update the following lines in php.ini:
    curl.cainfo="&lt;cacert\_location&gt;/cacert.pem"
    openssl.cafile="&lt;cacert\_location&gt;/cacert.pem"

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2811d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eddf3412bac8cbf8c541789aa95a8c5116e366e6f8397bacee9516566e14a606?d=identicon)[Klangoo](/maintainers/Klangoo)

---

Top Contributors

[![johnnyazzi](https://avatars.githubusercontent.com/u/5031352?v=4)](https://github.com/johnnyazzi "johnnyazzi (10 commits)")

### Embed Badge

![Health badge](/badges/klangoo-magnetapiclientphp/health.svg)

```
[![Health](https://phpackages.com/badges/klangoo-magnetapiclientphp/health.svg)](https://phpackages.com/packages/klangoo-magnetapiclientphp)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M478](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
