Yasb - Yet Another Spam Blacklist

Back to homepage

API

Check the status of an IP address

http://yasb.intuxication.org/api/check.xml?ip=000.000.000.000
returns a xml response :
	<result>
	  <ip>000.000.000.000</ip>
	  <spam>boolean</spam>
	</result>

A simple way to search Yasb with php, curl and simplexml :

<?php

$ip 
'';
$url 'http://yasb.intuxication.org/api/check.xml';

$curl_handle curl_init();
curl_setopt($curl_handleCURLOPT_URL"$url");
curl_setopt($curl_handleCURLOPT_CONNECTTIMEOUT2);
curl_setopt($curl_handleCURLOPT_RETURNTRANSFER1);
curl_setopt($curl_handleCURLOPT_POST1);
curl_setopt($curl_handleCURLOPT_POSTFIELDS"ip=$ip");
$buffer curl_exec($curl_handle);
curl_close($curl_handle);
$xml = new SimpleXMLElement($buffer);

print_r($xml);

?>

$xml->spam returns true if the IP address is blacklist by yasb and false if it is not yet blacklist.

Submit a spam

http://yasb.intuxication.org/api/submit.xml?ip=000.000.000.000
returns a xml response :
        <result>
	  <ip>000.000.000.000</ip>
	  <spam>boolean</spam>
	</result>

<spam> is set to true if the IP address has been added to database and false if the IP address is already in.


Yasb - Yet Another Spam Blacklist and http://yasb.intuxication.org are copyright © 2008.
Contact : yasb (at) intuxication (dot) org