GENDER API PHP-LEGACY

まず composer を使ってライブラリをインストールします:

クライアントの詳細なドキュメントはこちら:

https://github.com/markus-perl/gender-api-client

function getGender($firstname) {
  $myKey = 'insert your server key here';
  $data = json_decode(file_get_contents(
  'https://gender-api.com/get?key=' .
  $myKey .
  '&name=' . urlencode($firstname)));
  return $data->gender;
  }

  echo getGender('markus'); //Output: male

まず npm を使ってライブラリをインストールします:

クライアントの詳細なドキュメントはこちら:

https://github.com/markus-perl/gender-api-client-npm

まず npm を使ってライブラリをインストールします:

クライアントの詳細なドキュメントはこちら:

https://github.com/markus-perl/gender-api-client-npm

サンプルプロジェクトをダウンロード:

ドキュメント:

https://github.com/microknights/Gender-API
Chat