Pewnie że nie działa bo to rozwiązania dla phpBB2
Tu masz dla phpBB3
[php]<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
function file_put_contents2($n,$d)
{
$f=@fopen($n,"w");
if (!$f)
{
return false;
}
else
{
fwrite($f,$d);
fclose($f);
return true;
}
}
$sql = "SELECT user_email
FROM " . USERS_TABLE . "
WHERE user_id <> -1";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
$text = '';
if ( $row = $db->sql_fetchrow($result) )
{
do
{
$text .= $row['user_email'].', ';
}
while ( $row = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);
}
file_put_contents2('e-mails.txt', $text);
?>[/php]
Nie testowane...
Autor postu otrzymał pochwałę
Jak nie to nie, łaski bez...