PHPackages                             ikosar/lmfa - 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. ikosar/lmfa

AbandonedLibrary[API Development](/categories/api)

ikosar/lmfa
===========

This Package Help You to connect to Microsoft Face APi.

1(8y ago)1991MITPHPPHP &gt;=5.9.0

Since May 1Pushed 8y agoCompare

[ Source](https://github.com/ikosar/LMFA)[ Packagist](https://packagist.org/packages/ikosar/lmfa)[ RSS](/packages/ikosar-lmfa/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

LMFA
====

[](#lmfa)

This Package Help You To Connect To Microsoft Face APi by Mohammad Najafian

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

[](#installation)

#### install With Composer

[](#install-with-composer)

```
 composer require ikosar/lmfa
```

#### After :

[](#after-)

```
 php artisan vendor:publish
```

Config
======

[](#config)

Open `lmfa.php` in config folder in laravel root then you can enter you'r `api_key` in this file !

Usage
=====

[](#usage)

Normal Request (Return To You Face's info)
------------------------------------------

[](#normal-request--return-to-you-faces-info)

### 1 . First we need to do this 💯 :

[](#1---first-we-need-to-do-this--100-)

```
 $face = new CheckFace();
```

### 2 . We Set The Url :

[](#2---we-set-the-url-)

if you want to customize the url , Do this 💯 : (default : )

```
  $face->setUrl($url);
```

### 3 . Also Set Request Type ( post , get , delete , put ) 💯 :

[](#3---also-set-request-type--post--get--delete--put--100-)

To this step we set the request's type (only lowercase) :

```
  $face->setMethod("post");
```

### 4 . Set Headers 💯 :

[](#4---set-headers-100-)

We Must to set headers to use Microsoft's Face APi (only lowercase) :

##### if you want to put APi\_key in Headers or Parameters Use This :

[](#if-you-want-to-put-api_key-in-headers-or-parameters-use-this-)

```
  $face->getApiKey();
```

```
  $face->setHeaders(array(
     'Content-Type' => 'application/json',
     'Ocp-Apim-Subscription-Key' => $face->getApiKey(),
  ));
```

### 5 . Set Parameters 💯 :

[](#5---set-parameters-100-)

To this step we can set the Parameters :

```
  $face->setParameters(array(
      'returnFaceId' => 'true', // Recommended : True
      'returnFaceLandmarks' => 'false', // Very information about face sizes
      'returnFaceAttributes' => 'age,gender,glasses,smile,noise,hair,accessories,emotion,makeup', // Your Requsted info
  ));
```

You can set these in the returnFaceAttributes in parameters Some Face Attributes : age , gender , glasses , smile , noise , hair , accessories , emotion , makeup ... //

### 6 . Set image 💯 :

[](#6---set-image-100-)

Then , we need to set image :-) : We must to put image URL in the array Like This.

```
  $image = array(
      'url' => 'http://cdn-tehran.wisgoon.com/dlir-s3/10531466806488528869.JPG',
  );
  $face->setBody($image,true); // Set Image

```

### 7 . Check Request to complete seted 💯 :

[](#7---check-request-to-complete-seted-100-)

We must to Check Before `$face->send()`.

```
         $face->check();
         $face->send();
```

### 8 . Get Face Information in JSON 💯 :

[](#8---get-face-information-in-json-100-)

Do This :

```
         $face->check();
         $result = $face->send();
         // Now JSON in $result
         return $result;
```

Finish And a Example:
---------------------

[](#finish-and-a-example)

```
       $image = array(
           'url' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/Donald_Trump_August_19%2C_2015_%28cropped%29.jpg/245px-Donald_Trump_August_19%2C_2015_%28cropped%29.jpg',
       );
       $url = "http://...";
       $face = new CheckFace();
       $face->setUrl($url);
       $face->setImage($image);
       $face->setMethod("post");
       $face->setHeaders(array(
           'Content-Type' => 'application/json',
           'Ocp-Apim-Subscription-Key' => $face->getApiKey(),
       ));
       $face->setParameters(array(
           'returnFaceId' => 'true',
           'returnFaceLandmarks' => 'false',
           'returnFaceAttributes' => 'age,gender,glasses,smile,noise,hair,accessories,emotion,makeup',
       ));
       $face->setBody($image);
       $face->check();
       $result = $face->send();
```

\##Licence This Project is under the MIT Licence ##Read About Microsoft Face Api ###Types of requests

```
https://westcentralus.dev.cognitive.microsoft.com/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

2935d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/52ac376f2e661be48bc05a649b947681d9b453d632784498a0d9e720b40fd33d?d=identicon)[techwizards](/maintainers/techwizards)

---

Top Contributors

[![loverdeveloper](https://avatars.githubusercontent.com/u/33053881?v=4)](https://github.com/loverdeveloper "loverdeveloper (21 commits)")

---

Tags

face-apifacedetectionlaravellaravel-microsoft-face-apilmfamicrosoft-cognitive-servicemicrosoft-cognitive-servicesmicrosoft-face-apiphp

### Embed Badge

![Health badge](/badges/ikosar-lmfa/health.svg)

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

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/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)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

92437.3k6](/packages/botman-driver-telegram)

PHPackages © 2026

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