Transform your face using Artificial Intelligence with PHP FaceApp API
FaceApp is an Android and iOS application.
This library is an unofficial wrapper to their AI system.
- PHP >= 7.0
- cURL/PHP
composer require askual/facify
$FaceApp = new Facify('PHOTO_PATH');
Get the 'photo unique id' that has Been uploaded to faceapp servers
$photoCode = $FaceApp->getPhotoCode();
Get all filters are available to apply the photo
$photoCode = $FaceApp->getFilters(); //returns an array of filters
/*filters :
-no-filter
-smile
-smile_2
-hot
-old
-young
-hollywood
-fun_glasses
-hitman
-mustache_free
-pan
-heisenberg
-female
-female_2
-male
-no-filter
-impression
-goatee
-mustache
-hipster
-lion
-bangs
-glasses
-wave
-makeup
*/
Get the code of photo has Been uploaded to faceapp servers
$FaceApp->applyFilter(PHOTO_CODE , SELECTED_FILTER , CROP_FACE_OR_NOT);
//example :
//PHOTO_CODE(string) : $photoCode
//SELECTED_FILTER(string) : 'old'
//CROP_FACE_OR_NOT(bool) : true or false
Save the final filtered photo
$FaceApp->savePhoto('NEW_PHOTO_PATH.jpg');
As you may know this service has some limits for requesting so I created a "Proxy Mode" for it
Proxy servers has been added to faceapp.php line 44
All of them works well but i dont guarantee them to work for a long time
If you have any proxy server you can put it in the list
And you can turn the proxy server on with this code
$FaceApp = new FaceApp('PHOTO_PATH', true );
Take a look at "ProxyMode.php"
Facify
is licensed under the MIT License - see the LICENSE file for details