USE AT YOUR OWN RISK. This script only works on Mailman ". "subscription lists large enough to span multiple pages. It has been tested on Mailman version 2.1.5
"; echo "\n"; } else { $mailmanUrl =$_POST['url']; $theurl = $mailmanUrl."members?adminpw=".$listPassword; $numemails=0; // // Get the list of member letter pages // echo "\n";
echo "\n\n\n";
if (!($fp = fopen($theurl, 'r')))
{
echo 'could not open url';
exit;
}
$contents = '';
while (!feof($fp)) {
$contents .= fread($fp, 8192);
}
fclose($fp);
// echo $contents;
//
// put each segment in its own string
//
$lines = explode("members?letter=",$contents);
//
// iterate through lines and glean letter=
//
$i = 2; // ignore first two segments as they are extraneous
while ($lines[$i]!="") {
// echo substr($lines[$i++],0,1)."\n";
$letter = substr($lines[$i++],0,1);
$letterUrl = $mailmanUrl."members?letter=".$letter."&adminpw=".$listPassword;
echo "\n\n\n";
//
// Fetch the letter page - yes, this should be a subroutine, but oh well
//
if (!($lfp = fopen($letterUrl, 'r')))
{
echo 'could not open url';
exit;
}
$letterContents = '';
while (!feof($lfp)) {
$letterContents .= fread($lfp, 8192);
}
fclose($lfp);
//
// Parse to get email addresses
// todo - make it parse and output each line as "firstname lastname
";
$numemails++;
}
}
echo "
Number of email addresses in this list = ".$numemails."
\n"; } // end of else ?>