PHP: ezmlm_hash - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

mail Mail

Last updated: Sat, 27 Jan 2007

view this page in

# ezmlm_hash

(PHP 3 >= 3.0.17, PHP 4 >= 4.0.2, PHP 5)

ezmlm_hash -- Calculate the hash value needed by EZMLM

## Описание

int ezmlm_hash ( string addr )

ezmlm_hash() calculates the hash value needed when keeping EZMLM mailing lists in a MySQL database.

## Список параметров

`addr`

  The email address that's being hashed.

## Возвращаемые значения

The hash value of `addr`.

## Примеры

Пример 1. Calculating the hash and subscribing a user

`<?php
$user = "joecool@example.com";
$hash = ezmlm_hash($user);
$query = sprintf("INSERT INTO sample VALUES (%s, '%s')", $hash, $user);
$db->query($query); // using PHPLIB db interface
?>`

add a note User Contributed Notes
ezmlm_hash
jens at NOSPAM dot rootsy dot nu
30-Sep-2005 12:07
`This is really ezmlm documentation, but I certanly would have been happy if I found it anywhere during my time of trial. I am not a Linux expert, as you probably will notice, so things I do/did that might sound incredibly stupid to those who do know. I blame hard-to-find documentation :)
I wanted a page where a visitor could add their address to my mailinglist. That shouldn't be too hard, or atleastso I thought...
First I tried mailing the mailinglist. For some reason, the mailinglist didn't see my "From:" -header and it failed miserably.
Then I tried to use system() to call ezmlm-sub, which only produced the error-code 111. That was an access problem. So, I tried making the mailinglist availible to the website, but the change in permissions caused the mailserver to malfunction (as opposed to mailfunction....). It took a while to sort that mess out.
I couldn't find any guide as howto add mysql-support. The big problem was how to know which tables was needed. Apperantly, this is all that is needed:
ezmlm-mktab listname | mysql -u root -p databasename
Then its just adding the mailinglist with mysql-support i qmailadmin. It doesn't seem to allow socket connection to the database, so iptables has to allow local connections to the mysql port.
Hope this helps someone.`
Tim in SF
10-Dec-2003 07:57
`EZ Mailing List Manager (EZMLM) is a mailing list manager which allows users to create their own mailing lists with a single command.
It seems to require qmail.
See:
http://www.ezmlm.org/
http://www.qmail.org/top.html#ezmlm`
add a note
mail Mail

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 11:33:19 2007 PST