Re: Help can I stop people spamming email addresses
| From: | Chris Adams | Date: | Sun, 30 Jul 2000 19:56:26 +0000 |
| Subject: | Re: Help can I stop people spamming email addresses | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1631@lists.php.net to get a copy of this message | ||
> I have a clasifieds site and am concerned about people spaming the peoples
> email addresses as the are displayed on the pages on my site. Is there a
way
> that if someone wanted to reply to an advert that a form could appear and
> this allow them to key the reply, this would then query the database and
> send an email with out the email addressbeing seen?
Yes. In fact this would be an excellent way to provide anonymity as well.
The only thing that needs to get passed around is the numeric ID for the
user who created the ad. If you do this carefully, there's no need for the
advertiser's name or email address to be made public. The other advantage in
not generating a mailto: link is that you can track response rates. On
this
sort of site, it seems like it'd be good to have the number of responses as
well as more general stats (e.g. "Not only do we have 357,000 ads, 100,000
of them have received 5 or more responses").
The key parts of the logic would be something like this:
if (FORM_VALIDATED) {
$ToAddress = mysql_result(mysql_query("SELECT Email FROM Table WHERE
UserID=$AdUserID"), 0);
mail($ToAddress, "A response to your ad", $Body);
} else {
include('mail-form.php');
}
(If privacy is a big concern among your target audience, you could even set
up the system so that responses are anonymized in a similar fashion.)