mirror of
https://github.com/samsonjs/mit-license.git
synced 2026-04-11 12:15:47 +00:00
14 lines
370 B
PHP
14 lines
370 B
PHP
<?php
|
|
$users = json_decode(file_get_contents('users.json'));
|
|
$user = preg_replace('/\.mit-license\.org$/', '', $_SERVER["HTTP_HOST"]);
|
|
|
|
$holder = "<copyright holders>";
|
|
if (property_exists($users, $user)) {
|
|
$holder = $users->$user;
|
|
}
|
|
|
|
$info = date('Y') . ' ' . $holder;
|
|
$license = file_get_contents('LICENSE');
|
|
echo str_replace('{{info}}', $info, $license);
|
|
|
|
?>
|