xref: /web-master/fetch/cvsforwarding.php (revision 3f5dc40d)
1<?php
2
3require_once __DIR__ . '/../include/functions.inc';
4
5# token required, since this should only get accessed from php.net mx
6if (!isset($_REQUEST['token']) || md5($_REQUEST['token']) != "19a3ec370affe2d899755f005e5cd90e")
7  die("token not correct.");
8
9// Connect and generate the list from the DB
10db_connect();
11$res = db_query_safe("SELECT username,email,spamprotect FROM users WHERE email != '' AND cvsaccess");
12if ($res) {
13  while ($row = @mysql_fetch_array($res)) {
14    echo "$row[username]@php.net: ",
15         ($row['spamprotect'] ? "|/local/bin/automoderate," : ""),
16         "$row[email];\n";
17    echo "$row[username]@pair2.php.net: ",
18         ($row['spamprotect'] ? "|/local/bin/automoderate," : ""),
19         "$row[email];\n";
20  }
21}