2 // Requires PHP >= 4.3.0
3 // Author: "Krasko Oleksandr" <0m3r.mail@gmail.com>
4 // Minor improvements by Christian Grothoff <christian@grothoff.org>
5 header("Content-Type: application/octet-stream\r\n\r\n");
10 for ($ii=0;$ii<64;$ii++)
11 if (0 != ($pv & (1 << $ii)))
16 $extmas = array('2','3','4','5','6','8','12','17','23','25');
18 $path = '/var/lib/gnunet/data/hosts/'; // adjust as necessary
19 $dir = opendir($path);
21 die("Cannot open directory $path.\n");
23 while ($fname = readdir($dir)) {
24 $fn = $path . '/' . $fname;
26 $dpo = strpos($fname, '.') + 1;
27 $len = strlen($fname);
28 if (in_array(substr($fname, $dpo - $len), $extmas))
32 shuffle($mas); // randomize order
33 foreach ($mas as $val)
34 echo file_get_contents($val);