PHP code example of agraciakuvut / kuvutplaces

1. Go to this page and download the library: Download agraciakuvut/kuvutplaces 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/ */

    

agraciakuvut / kuvutplaces example snippets


$apikey = 'xxxxxx';
$places = new \agraciakuvut\KuvutPlaces($apikey);

$places->setCountry('XX');

$places->setPlatform('XXX');

$places->setPostalCode('00000');

$places->validate();

object(stdClass)#3 (1) {
  ["result"]=>
  object(stdClass)#2 (3) {
    ["valid"]=>
    bool(false)
    ["msg"]=>
    string(21) "Postal code not valid"
    ["code"]=>
    int(5)
  }
}