-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample.php
More file actions
26 lines (25 loc) · 826 Bytes
/
Copy pathexample.php
File metadata and controls
26 lines (25 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
* Created by PhpStorm.
* User: RAMS
* Date: 25.03.2019
* Time: 9:54
*/
require_once('FakeNameGeneratorAPI.php');
require_once('FakeNameGeneratorCountries.php');
require_once('FakeNameGeneratorNameSet.php');
$IdentityGenerator = new \FakeNameGenerator\FakeNameGeneratorAPI();
// get record with filters
$identity = $IdentityGenerator->CreateIdentity('Male', \FakeNameGenerator\FakeNameGeneratorNameSet::AMERICAN, \FakeNameGenerator\FakeNameGeneratorCountries::UNITED_STATES);
if ($identity['error'] == false) {
print_r($identity['userIdentity']);
} else {
echo 'We hot error ' . $identity['msg'];
}
//get just one random record
$identity = $IdentityGenerator->getRandom();
if ($identity['error'] == false) {
print_r($identity['userIdentity']);
} else {
echo 'We hot error ' . $identity['msg'];
}