4 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Kristian Fiskerstrand
6 * This file is part of SKS Keyserver Pool (http://sks-keyservers.net)
8 * The Author can be reached by electronic mail at kf@sumptuouscapital.com
9 * Communication using OpenPGP is preferred - a copy of the public key 0x0B7F8B60E3EDFAE3
10 * is available in all the common keyservers or in hkp://pool.sks-keyservers.net
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 require("sks.inc.php");
27 require("sks-status.inc.php");
29 $title = "History of number of OpenPGP keys";
31 include($dir."inc/header.inc.php");
33 $servers = unserialize(file_get_contents(dirname(__FILE__
)."/sks_cache_status_collection.serialized"));
34 $status_collection = unserialize(file_get_contents(dirname(__FILE__
)."/sks_cache_status_collection.serialized"));
35 $numkeys = $servers->get_numkey_history();
36 $stats = $status_collection->get_statistics_data();
37 $mk = (int)$stats['max_keys'];
41 function diff_by_days(&$data, $days=1)
48 foreach($data as $k=>$v)
63 return ($end - $start);
66 function val_by_days(&$data, $days=1)
72 foreach($data as $k=>$v)
83 <table style
="width: 570px;">
84 <tr
><td
>Keys added
today (partial
):</td
><td style
="text-align: right;"><?
=number_format($mk - val_by_days($numkeys, 1));?
></td
></tr
>
85 <tr
><td
>Keys added yesterday
:</td
><td style
="text-align: right;"><?
=number_format(diff_by_days($numkeys, 1));?
></td
></tr
>
86 <tr
><td
>Keys added the past
7 days
:</td
><td style
="text-align: right;"><?
=number_format(diff_by_days($numkeys, 7));?
></td
></tr
>
87 <tr
><td
>Keys added the past
30 days
:</td
><td style
="text-align: right;"><?
=number_format(diff_by_days($numkeys, 30));?
></td
></tr
>
88 <tr
><td
>Keys added the past
180 days
:</td
><td style
="text-align: right;"><?
=number_format(diff_by_days($numkeys, 180));?
></td
></tr
>
90 <p
>Below is a chart showing the development in the number of total OpenPGP keys by day
.</p
>
91 <img src
="generate_key_chart.php" alt
="Total number of OpenPGP keys" />
92 <p
>Below is a chart showing the development in the number of OpenPGP keys added by day
.</p
>
93 <img src
="generate_key_bar_chart.php" alt
="Number of OpenPGP keys added by day" />
95 include($dir."inc/footer.inc.php");