[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vps-mail] sendmail dnsbl macros



	Just to close the loop...

<?php
function dnsbl_lookup($ip, $bl) {
	if ($ip) {
		$rip = implode('.', array_reverse(explode('.',$ip)));
		return gethostbyname("$rip.$bl");
	} else {
		return 'ERR';
	}
}

switch (dnsbl_lookup($_GET['ip'], 'sbl-xbl.spamhaus.org')) {
	case '127.0.0.2' :
		// SBL
		break;
	case '127.0.0.4' :
	case '127.0.0.5' :
	case '127.0.0.6' :
		// XBL
		break;
	default	:
		// not found
	}
?>


 - Steve Yates
 - ITS, Inc.
 - I don't work long hours.  They are all 60 minutes, just like everyone else's.

~ Taglines by Taglinator 4 - www.srtware.com ~
======================================================================
This is <vps-mail@xxxxxxxxxxxx>       <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).


Main Index | Thread Index
Match: Format: Sort by:
Search: