cvs: phpweb / mailing-lists.php

From: Date: Thu, 21 Aug 2003 10:23:46 +0000
Subject: cvs: phpweb / mailing-lists.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-20521@lists.php.net to get a copy of this message
goba Thu Aug 21 06:23:46 2003 EDT Modified files: /phpweb mailing-lists.php Log: Do not drive users who try to [un]subscribe to www.php.net, but use the usual posttohost() method instead. We have an entry point for subscriptions at master.php.net to use for this. Also fix the footer output when the submission results are printed. Index: phpweb/mailing-lists.php diff -u phpweb/mailing-lists.php:1.49 phpweb/mailing-lists.php:1.50 --- phpweb/mailing-lists.php:1.49 Sat Aug 16 09:20:27 2003 +++ phpweb/mailing-lists.php Thu Aug 21 06:23:46 2003 @@ -1,7 +1,8 @@ <?php -// $Id: mailing-lists.php,v 1.49 2003/08/16 13:20:27 goba Exp $ +// $Id: mailing-lists.php,v 1.50 2003/08/21 10:23:46 goba Exp $ $_SERVER['BASE_PAGE'] = 'mailing-lists.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; +include_once $_SERVER['DOCUMENT_ROOT'] . '/include/posttohost.inc'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/email-validation.inc'; site_header("Mailing Lists"); @@ -29,16 +30,20 @@ $sub = str_replace("@", "=", $_POST['email']); $remote_addr = i2c_realip(); - // Try to send mail - $mail_sent = mail( - "$maillist-$request-$sub@lists.php.net", - "Website Subscription", - "This was a request generated from the form at http://php.net/mailing-lists.php by $remote_addr.", - "From: {$_POST['email']}\r\n" + // Get in contact with master server to [un]subscribe the user + $result = posttohost( + "http://master.php.net/entry/subscribe.php", + array( + "request" => $request, + "email" => $_POST['email'], + "maillist" => $_POST['maillist'], + "remoteip" => $remote_addr, + "referer" => $MYSITE . "mailing-lists.php" + ) ); - // Provide error if unable to send mail - if (!$mail_sent) { + // Provide error if unable to [un]subscribe + if ($result) { $error = "We were unable to subsribe you due to some technical problems.<br/ >" . "Please try again later."; } @@ -56,7 +61,7 @@ </p> <?php } - commonFooter(); + site_footer(); exit; } @@ -304,7 +309,7 @@ ?> -<form method="post" action="http://www.php.net/mailing-lists.php"> +<form method="post" action="/mailing-lists.php"> <h2><a name="general">General Mailing Lists</a></h2>

« previous php.mirrors (#20521) next »