[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2625 - GNUnet/contrib
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2625 - GNUnet/contrib |
Date: |
Sat, 22 Apr 2006 08:01:14 -0700 (PDT) |
Author: grothoff
Date: 2006-04-22 08:01:12 -0700 (Sat, 22 Apr 2006)
New Revision: 2625
Added:
GNUnet/contrib/hostlist.php
Modified:
GNUnet/contrib/Makefile.am
Log:
syn
Modified: GNUnet/contrib/Makefile.am
===================================================================
--- GNUnet/contrib/Makefile.am 2006-04-22 11:29:45 UTC (rev 2624)
+++ GNUnet/contrib/Makefile.am 2006-04-22 15:01:12 UTC (rev 2625)
@@ -7,6 +7,8 @@
config-daemon.in
EXTRA_DIST = \
+ hostlist.cgi \
+ hostlist.php \
gnunet-download-manager.scm \
init_gnunet_redhat init_gnunet_ubuntu \
visualize_stats.sh \
Added: GNUnet/contrib/hostlist.php
===================================================================
--- GNUnet/contrib/hostlist.php 2006-04-22 11:29:45 UTC (rev 2624)
+++ GNUnet/contrib/hostlist.php 2006-04-22 15:01:12 UTC (rev 2625)
@@ -0,0 +1,24 @@
+<?php
+// Requires PHP >= 4.3.0
+// Author: "Krasko Oleksandr" <address@hidden>
+// Minor improvements by Christian Grothoff <address@hidden>
+header("Content-Type: application/octet-stream\r\n\r\n");
+$extmas = array('6','8','12','17','23','25');
+$path = '/var/lib/GNUnet/data/hosts/'; // adjust as necessary
+$dir = opendir($path);
+if (! $dir)
+ die("Cannot open directory $path.\n");
+$mas = array();
+while ($fname = readdir($dir)) {
+ if (is_file($path . '/' . $fname)) {
+ $dpo = strpos($fname, '.') + 1;
+ $len = strlen($fname);
+ if (in_array(substr($fname, $dpo - $len, $extmas)) {
+ $mas[] = $fname;
+ }
+ }
+}
+shuffle($mas); // randomize order
+foreach ($mas as $val)
+ echo file_get_contents($val);
+?>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2625 - GNUnet/contrib,
grothoff <=