PHP code example of mcheck / mcheck-php

1. Go to this page and download the library: Download mcheck/mcheck-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mcheck / mcheck-php example snippets



//create an instance of `MCheckRest`

use mcheck\MCheckRest;

$api = new MCheckRest("secret key here");

//validate a number using "Missed sms method". (type can be : sms)

$response = $api->RequestValidation(array("type" => "sms", "phone" => "+number_here"));

//verify a pin for a certain request

$response = $api->VerifyPin(array("id" => "request id here", "pin" => "5659"));

//check validation status for a certain request

$response = $api->ValidationStatus(array("id" => "request id here"));



php-curl
php-openssl