PHP (Legacy)

No description

fork
loading
main.php
1
2
3
4
5
6
function findGender($name) {
  $apiKey = ''; //Your API Key
  $data = json_decode(file_get_contents('https://genderapi.io/api?key=' . $apiKey . '&name=' . urlencode($name)));
  return $data->gender;
}
echo findGender('angela');
PHP 7.0.8 (Legacy: use the following for new features: Command-line PHP: https://repl.it/languages/php_cli PHP Web Server: https://repl.it/languages/php7