Php Mailing List with no MySql

Php Mailing List with no MySql
<?php
if(!isset($_GET["email"])) {
?>
<form action="maillist.php" method="get">
Your email: <input type="text" name="email" id="email"><input type="submit" value="Submit">
</form>
<?php
} else {

if(!$_GET["act"]) {
$fi = file("admin/elist.txt");
sort($fi);
for($i = 0; $i < count($fi); $i++) {
if(ereg($fi[$i], $_GET["email"])) {
print "You'r already in list!";
die();
}
}
$f = fopen("admin/elist.txt", "a+");
$kir = fwrite($f, "n" . $_GET["email"]);
fclose($f);
mail($_GET["email"], "Mailing List", "Hi, nnYou have succesfully joined our mailing list at mysite.com. You'll be getting mail when it comes updates. If you want to leave our list, simply click the link below: http://www.yoursite.com/maillist.php?act=us&id=" . $_GET["email"] . "&n=followedfromlinkatemail", "From:You <yoursite@yoursite.njet>");
if($kir) {
print "You have now joined our mailing list, gongratulations!";
die();
} else {
print "Something went wrong please try again...";
}
}
}
if($_GET["act"] == "us") {
if($id != "") {
$em = file("admin/elist.txt");
for($i = 0; $i < count($em); $index++) {
if(eregi($id, $em[$i])) {
$em[$i] = "";
$file = fopen("admin/elist.txt", "w");
for($ni = 0; $ni < count($em); $ni++) {
if($em[$ni] != "") {
fwrite($file, $em[$ni]);
}
}
fclose($file);
}
}
}
print "You have unsubscribed succesfully.";
}
?>

Your email:  

<?php
$emailL = file("elist.txt");
if(!isset($_GET["title"])) {
?>
<form action="manage.php" method="get">
<table border="0" cellpadding="0" cellspacing="0" style="font-family:Arial; color:#FFFFFF; font-size:10pt">
<tr>
<td>
Title
</td>
<td>
<input type="text" name="title" id="title">
</td>
</tr>
<tr>
<td>
Your name
</td>
<td>
<input type="text" name="sendersname" id="sendersname">
</td>
</tr>
<tr>
<td>
To
</td>
<td>
<select name="to" id="to">
<option value="all">All</option>
<?php
for($i = 0; $i < count($emailL); $i++) {
print "<option value="" . $emailL[$i] . "">" . $emailL[$i] . "</option>";
}
?>
</select>
</td>
</tr>
<tr>
<td valign="top">
Message
</td>
<td>
<textarea name="msg" id="msg" rows="10" cols="25" style="font-size:8pt; overflow:auto"></textarea><br>
<input type="button" name="button" id="button" onclick="laheta()" value="Send">
</td>
</tr>
</table>
</form>
<?php
} else {
if($_GET["to"] == "all") { for($i = 0; $i < count($emailL); $i++) {mail($emailL[$i], $_GET["title"], $_GET["msg"] . "nn--------------------------------------------------------nThis message is not spam. If you want to leave, simply follow link below:nhttp://www.taikasilma.com/temekoo/maillist.php?act=us&id=" . $emailL[$i] . "&button=pressedn--------------------------------------------------------n", "From:" . $_GET["sendersname"] . "<gd@gfd.njet>, To:" . $emailL[$i]);} print "Mail sent succesfully.";} else {
mail($_GET["to"], $_GET["title"], $_GET["msg"] . "nn--------------------------------------------------------nThis message is not spam. If you want to leave, simply follow link below:nhttp://www.taikasilma.com/temekoo/maillist.php?act=us&id=" . $email . "&button=pressedn--------------------------------------------------------n", "From:" . $_GET["sendersname"] . "<gd@gfd.njet>, To:" . $_GET["to"]);
print "Mail sent succesfully.";
}
}
?>






Related Articles

  • What is an Internet Mailing List?
    An Internet Mailing List is a list made up of subscribers using emails as the medium of communication. Joining a mailing list is a way of saying Keep me informed; a list of people have requested to be informed of a spec...
  • MySQL Join Tutorial
    What are joins and how do you make them?
  • Acquiring PHP MySQL
    PHP and MySQL are already packaged in Linux and Mac OS X OSs. However, most PHP developer are actually using Windows when developing PHP applications. This is also true to myself. I have Mandrake Linux 10 but Ill just use it for testing purposes of my finished scripts...
  • Free Traffic Course - Day 4
    This day 4 of Free Traffic Course is devoted to mailing lists, their power to increase targeted web site traffic, automate online advertising and give more sales from web site visitors...
  • Alternating Rows: Mysql
    The first thing we need to do is connect to the database. I always put my db connection in a universal file, that way I can just change the variables once if I need to; but for the sake of the tutorial, im putting it in this file.
  • Building a Subscriber List with Articles
    Websites generate sales. Thats the whole reason they exist for many people. And mailing lists also generate sales. Targeted mailing lists, especially, are valuable; the audience they are directed at have been identified as interested in a niche item, and are likely to have a higher per-piece sale ....
  • RSS: The king of Permission Marketing
    Gold is in your mailing list.
    How many times have you heard this statement before?
    Undoubtedly, these words have been used so many times that they have become one of the verified clichés in Internet marketing.
  • PHP Navigation and Connecting to a MySQL Database
    PHP Navigation and Connecting to a MySQL Database
  • Alternating Row Colors
    Theres two different ways this can be done. The first is by getting results from a mysql query, the second is going through the values of an array. Ill go over both. First the full files (ill break it up into two files, one using mysql, and one using an array)
  • Using Mirror Pages Effectively
    Thought I would share with you a very effective technique for adding new customers to your mailing list. These are individuals who would not otherwise discover your products or services - because they did not come to the internet specifically looking for your products or services...

Contact Web Design Outsource and get started today

Need Website Designing, Development, Redesigning, Maintenance and SEO services or help growing your company's web presence? Request a free Quote Now.