6 $proc = proc_open("./$script php", array(
7 0 => array('pipe', 'r'),
8 1 => array('pipe', 'w'),
9 2 => array('pipe', 'w')
11 foreach ($_GET as $k => $v) {
12 fwrite($pipes[0], urlencode($k)."=".urlencode($v)."\n");
16 $stderr = fread($pipes[2], 4096);
17 $exit = proc_close($proc);
19 echo "<h1>Error happened, code $exit</h1>\n";
21 echo "<pre>".htmlspecialchars($stderr);
24 $pi = substr($_SERVER["PATH_INFO"], 1);
26 readfile("index.html");
28 } elseif ($pi == 'search') {
29 go("search_packages.pl");
30 } elseif (substr($pi, 0, 8) == 'package/') {
31 $_GET['searchon'] = 'names';
32 $_GET['keywords'] = substr($pi, 8);
33 $_GET['suite'] = 'all';
35 go("search_packages.pl");
36 } elseif (substr($pi, 0, 4) == 'src:') {
37 header("Location: http://merkel.debian.org/~jeroen/pdo/source/".urlencode(substr($pi,4)));
38 } elseif (!eregi('[^a-z0-9+.-]', $pi)) {
39 header("Location: http://merkel.debian.org/~jeroen/pdo/package/".urlencode($pi));