http://yasb.intuxication.org/api/check.xml?ip=000.000.000.000returns 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_handle, CURLOPT_URL, "$url");
curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl_handle, CURLOPT_POST, 1);
curl_setopt($curl_handle, CURLOPT_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.
http://yasb.intuxication.org/api/submit.xml?ip=000.000.000.000returns 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.