A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

[Release] PHP Mailing List

1.2k views · started by 323 ·
#1
[Release] PHP Mailing List
PHP Mailing List


This is my PHP Mailing List that I wrote when I didn't feel like signing up for one of those Mailing List services.

Put this little bit of HTML on your webpage in the body wherever you want the box to sign up to be:

<p>Type in your email and hit enter to sign up for our mailing list!</p>
<form action="sent.php" id="mailinglist" method="post">
<input type="text" name="mail" size="40">
</form>


Then create a file called list.txt for the emails, and a file called sent.php with the following in it:

<?php
$email = $_POST['mail'];
$date = date("F j, Y");
$all = "Email: " . $email . "\n";
$file = "list.txt";
$handle = fopen($file, "a+");
fwrite($handle, $all);
fclose($handle);
header ("Location: http://www.YOURWEBSITE'SHOMEPAGE.com");
header("Content-type: text/plain");
print_r(htmlspecialchars(print_r($_POST, 1)));
?>


Enjoy!

This is just to make a simple mailing list with PHP, nothing too advanced. To get the list of emails you have to open the file called list.txt

Thanks,

~Flareboy323
#2
Why is everyone posting the same thing over and over o_0
#3
No one else has posted this. This is for pure business and community purposes, not hacking purposes. XiRaX's post was for a mailbomber, which is a spammer. Mine could be used for something like forum newsletters, not hacking.