[SURBL-Discuss] Perl/PHP Guru required,

William Stearns wstearns at pobox.com
Tue Nov 23 19:38:21 CET 2004

Good day, Alex, all,

On Tue, 23 Nov 2004, Alex Broens wrote:

> Need someone to write a perl or php script to parse the ws zone and pipe 
> the entries into a mysql DB.
> any takers? Pls contact me off list

	There's no need to do programming to load the zone; you can
download the file directly and import it:

wget http://www.stearns.org/sa-blacklist/sa-blacklist.current.domains
mysql -u {username} -p
{enter password}
create database sabldomains;
use sabldomains;
create table domains ( domain varchar(255) );
load data local infile 'sa-blacklist.current.domains' into table domains;
alter table domains add column id int(11) not null auto_increment primary key first;

	You can add other columns like the above.

select * from domains order by id desc limit 20;

	To see some sample entries in the database.

	My entire knowledge of mysql - and sql in general - was completely
exhausted before I'd even finished typing the mysql command line.  :-)  
Many thanks to Marion Bates, our resident php / os/x / mysql guru for the
above instructions.  Please contact her directly if you have questions
about the above.
	- Bill

        "The time for action is past!  Now is the time for senseless
(Courtesy of Vivek Dasmohapatra <vivek at etla.org>)
William Stearns (wstearns at pobox.com).  Mason, Buildkernel, freedups, p0f,
rsync-backup, ssh-keyinstall, dns-check, more at:   http://www.stearns.org

More information about the Discuss mailing list