Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Mail List - Mass Mail Program included
Google
Post new topic Reply to topic
Author Message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Tue Nov 21, 2006 2:29 pm Reply with quoteBack to top

search for max_execution_time in php.ini you cand find it in %WINDIR%\PHP.ini and enter a bigger value
or with a .htaccess file add this line in it
php_value max_execution_time the-value
View user's profileSend private messageSend e-mailYahoo Messenger
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Wed Nov 22, 2006 2:26 pm Reply with quoteBack to top

Code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<title>Untitled Document</title>
</head>

<body>
<style type="text/css">
body {
color:#666666;
font-family:Arial, Helvetica, sans-serif;
font-weight:bold;
font-size:12px;
background-color:#FFFFFF;
}
input, textarea {
border:1px solid #999999;
}
a {
text-decoration:none;
color:#990000;
}
</style>

<?php
if (!isset($cmd)) $cmd = '';
switch($cmd){
default:
$mailusers = "D:\\apache2triad\\mail\\mailusers.tab";
$a = file_get_contents($mailusers);
$d = explode("\n", $a);
$i=0;
$s = count($d)-1;
?>

<table align="center"><tr><td>
<form method=post action="index.php?cmd=send">
<?php echo "<b>Total $s users</b><br />";?>
<input type="text" name="s1" /> begin id<br />
<input type="text" name="s2" /> end id<br />
<input type="text" name="subject" /> Subject<br />
<textarea name="message" cols="30" rows="10"></textarea> Text<br />
<input type="submit" value="Send" />
</form></td></tr></table>
<?php
break;
case 'send':

if (strtoupper(substr(PHP_OS,0,3)=='WIN')) {
  $eol="\r\n";
} elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')) {
  $eol="\r";
} else {
  $eol="\n";
}

$mailusers = "D:\\apache2triad\\mail\\mailusers.tab";
$a = file_get_contents($mailusers);
$d = explode("\n", $a);
$i=0;
$s = count($d)-1;
echo "total $s users<br />";
$s1 = htmlspecialchars($_POST['s1']);
$s2 = htmlspecialchars($_POST['s2']);
if ($s2>$s) $s2=$s;
if (is_numeric($s1) & is_numeric($s2) & ($s1<=$s2) & ($s1>=0)){
   for ($i=$s1; $i<=$s2; $i++){
   $re = str_replace('"', "", $d[$i]);
   $ex = explode("   ", $re);
   $subject = htmlspecialchars($_POST['subject']);
   $mime_boundary="----=_".md5(time());
   
   
   $headers="";
   $now=date("YmdHis");
   $headers .= 'From: from <from@bla.bla>'.$eol;
   $headers .= 'Reply-To: reply <reply@bla.bla>'.$eol;
   $headers .= 'Return-Path: return <return@bla.bla>'.$eol;   
   $headers .= "Message-ID: <".$now."@".$_SERVER['SERVER_NAME'].">".$eol;
   $headers .= "X-Mailer: PHP v".phpversion().$eol;         
   $headers .= 'MIME-Version: 1.0'.$eol;
   $headers .= "Content-Type: multipart/alternative; boundary=\"".$mime_boundary."\"".$eol.$eol;
   $msg  = "";
   $msg .= "--".$mime_boundary.$eol;
   $msg .= "Content-Type: text/html; charset=\"iso-8859-9\"".$eol;
   $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
   $msg .= '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';
   $msg .= '<html xmlns="http://www.w3.org/1999/xhtml">';
   $msg .= '<head>';
   $msg .= '<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />';
   $msg .= '</head>';
   $msg .= '<body>';
   $msg .= nl2br(htmlspecialchars($_POST['message']));
   $msg .= '</body>';
   $msg .= '</html>'.$eol.$eol;
   $msg .= "--".$mime_boundary."--".$eol.$eol;
        mail("$ex[1]@$ex[0]", $subject, $msg,$headers);
   echo "[$i] Email sent to <b>$ex[1]@$ex[0]</b><br />";
   }
} else {
echo "<br /> Wrong input.<br />";
}
echo "<a href=\"javascript:history.go(-1)\">Back.</a>";
break;
}
?>
<center>&copy; 2004 - <?=date('Y');?> Copyright <a href="http://cigraphics.kb.ro">CIGraphics</a>.</center>
</body>
</html>


Thanks cigraphics. it is useful Wink
View user's profileSend private message
cigraphics
 
 


Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti

PostPosted: Thu Nov 23, 2006 9:16 pm Reply with quoteBack to top

you can remove the copyright if you want Smile
View user's profileSend private messageSend e-mailYahoo Messenger
mastertr
 
 


Joined: 24 Jul 2006
Posts: 24

PostPosted: Fri Nov 24, 2006 6:46 am Reply with quoteBack to top

thanks, but i dont want. your work, your sign Smile
View user's profileSend private message
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT