 |
Apache2Triad Help, Support and Development The apache2triad help , support and development forums
|
| View previous topic :: View next topic |
| Author |
Message |
cigraphics
Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti
|
| Posted: Tue Nov 21, 2006 2:29 pm Post subject: |
|
|
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 |
|
| Back to top |
|
mastertr
Joined: 24 Jul 2006
Posts: 24
|
| Posted: Wed Nov 22, 2006 2:26 pm Post subject: |
|
|
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>© 2004 - <?=date('Y');?> Copyright <a href="http://cigraphics.kb.ro">CIGraphics</a>.</center>
</body>
</html>
Thanks cigraphics. it is useful :wink: |
|
| Back to top |
|
cigraphics
Joined: 21 Aug 2005
Posts: 148
Location: Romania, Pitesti
|
| Posted: Thu Nov 23, 2006 9:16 pm Post subject: |
|
|
| you can remove the copyright if you want :) |
|
| Back to top |
|
mastertr
Joined: 24 Jul 2006
Posts: 24
|
| Posted: Fri Nov 24, 2006 6:46 am Post subject: |
|
|
| thanks, but i dont want. your work, your sign :) |
|
| Back to top |
|
| |
|