I have set up an ezine which is sent out to 700 subscribers which are stored in a database.
The script I use timed out, so only a few hundred subscribers received the e-zine.
How can I extend the time out period?
Thanks in advance for your help!
Best,
Herman
==== script ====
<?php
// get list of articles
$articles = mysql_query("SELECT * FROM ictoday")
or die("Error: ".mysql_error());
// compose message
$headlines = "";
$msg = "";
while ($arty = mysql_fetch_array($articles)) {
$headlines .= " - " . $arty["headline"] . "\n";
$msg .= "======================\n".$arty["headline"] . "\n======================\n"
. $arty["body"]."\n\n" . $arty["source"] . ", " . $arty["date"] . "\n" . $arty["hyperlink"]. "\n\n";
}
// get addressees
$subscribers = mysql_query(
"SELECT emailaddress FROM subscribers"
) or die("Error: ".mysql_error());
// set up...
$date = date("F d, Y");
$intro = "Welcome to ICT Weekly of " . $date . "\n\n" . "This week's headlines are:\n\n";
$headers =
"From: editor@infonomics.nl\n"
."Reply-To: editor@infonomics.nl";
$subj = "Infonomics ICT Weekly of $date";
$full = $headlines . "\n\n" . $msg;
// ...and send
while ($addr = mysql_fetch_array($subscribers)) {
mail(
$addr["emailaddress"],
$subj,
$full,
$headers
);
}
echo("<p class=\"text\"><b>The news was distributed to all its subscribers!</b>");
?>