AndyB
10-5-05, 09:37 PM
Greetings!
I'm making a custom, newsletter/mailing-script that plugs into a MySQL db and serves a user-base of roughly 180-ish members (expected to grow). Unlike a regular newsletter, this script is intended to be used once-in-a-blue-moon; more like an administrator's announcement script.
My question regards not much of the script itself; rather, it's proper usage & programming. Does Pow-Web have any set limits, procedures, or abuse guidelines that deal with these sorts of scripts? Further, are there methods besides the standard 'for loop, mail()' snippet that stand better for my situation, or help improve it? The last thing I'd want to have is my script unintentionally pig out on resources.
For the record, this is not intended for building a SPAM-ing script or the like.
Rather, for my client, a Star Wars costuming organization known as The Jedi Assembly (http://www.thejediassembly.com/). Come visit us! ;)
Here is a sample of code pertinent to the issue. Note that a few of the functions are proprietary.
$sql = db_connect();
$mbrSQL = mysql_query("SELECT jedi, addr FROM xxxx;");
$list = array(); $i = 0; while ($rcrd=mysql_fetch_assoc($mbrSQL)){
$list[$i] = $rcrd; $i++;} db_close($sql);
for ($i=0;$i<count($list);$i++) {
@mail($list[$i]["addr"],securityStrip($_POST["subject"]),"Greetings, ".$list[$i]["jedi"]."!\n\n".securityStrip($_POST["$content"]),"From: do_not_reply@thejediassembly.com");
usleep(50000);
}
If someone can fill me in on this issue or offer script suggestions, it would be loads of help. Thank you. :)
I'm making a custom, newsletter/mailing-script that plugs into a MySQL db and serves a user-base of roughly 180-ish members (expected to grow). Unlike a regular newsletter, this script is intended to be used once-in-a-blue-moon; more like an administrator's announcement script.
My question regards not much of the script itself; rather, it's proper usage & programming. Does Pow-Web have any set limits, procedures, or abuse guidelines that deal with these sorts of scripts? Further, are there methods besides the standard 'for loop, mail()' snippet that stand better for my situation, or help improve it? The last thing I'd want to have is my script unintentionally pig out on resources.
For the record, this is not intended for building a SPAM-ing script or the like.
Rather, for my client, a Star Wars costuming organization known as The Jedi Assembly (http://www.thejediassembly.com/). Come visit us! ;)
Here is a sample of code pertinent to the issue. Note that a few of the functions are proprietary.
$sql = db_connect();
$mbrSQL = mysql_query("SELECT jedi, addr FROM xxxx;");
$list = array(); $i = 0; while ($rcrd=mysql_fetch_assoc($mbrSQL)){
$list[$i] = $rcrd; $i++;} db_close($sql);
for ($i=0;$i<count($list);$i++) {
@mail($list[$i]["addr"],securityStrip($_POST["subject"]),"Greetings, ".$list[$i]["jedi"]."!\n\n".securityStrip($_POST["$content"]),"From: do_not_reply@thejediassembly.com");
usleep(50000);
}
If someone can fill me in on this issue or offer script suggestions, it would be loads of help. Thank you. :)