I was looking for a PHP Client for SURBL to use it in one of my Projects. But, couldn’t find one.
So, I wrote it for myself which is basically the ported version of Python’s surblclient – https://github.com/infixfilip/surblclient

You can download my php-surblclient from here (or fork it!):
https://github.com/abhiomkar/php-surblclient

About SURBL
SURBLs are lists of web sites that have appeared in unsolicited messages. SURBL list can be used with programs that can check message body web sites against SURBLs, such as SpamAssassin 3 and others mentioned on the links page.

multi.surbl.org is a combined SURBL list where you can use this to find if this is Blacklisted under any of the surbl lists.

All of the SURBL data sources are combined into a single, bitmasked list: multi.surbl.org. Bitmasking means that there is only one entry per domain name or IP address, but that entry will resolve into an address (DNS A record) whose last octet indicates which lists it belongs to. The bit positions in that octet for the different lists are:
2 = comes from sc.surbl.org
4 = comes from ws.surbl.org
8 = comes from phishing data source (labelled as [ph] in multi)
16 = comes from ob.surbl.org
32 = comes from ab.surbl.org
64 = comes from jp data source (labelled as [jp] in multi)

If an entry belongs to just one list it will have an address where the last octet has that value, for example 127.0.0.8 means it comes from the phishing list and 127.0.0.2 means it’s in the data used in sc.surbl.org. An entry on multiple lists gets the sum of those list numbers as the last octet, so 127.0.0.6 means a record is on both ws.surbl.org and sc.surbl.org (comes from: 2 + 4 = 6). In this way, membership in multiple lists is encoded into a single response.

More Details at: http://www.surbl.org/lists

php-surblclient: https://github.com/abhiomkar/php-surblclient

Tagged with:
 
  • pti-seb

    Nice work, I use it for BilboLink (URL shortener).

    • Anonymous

      Thank you! Nice to know! :)

  • http://www.tux-planet.fr pti-seb

    I have a suggestion about this library : can you add DBL and URIDBL support ? It work same as SURBL and the implementation will be easy I think.

    Best regards.

    • Anonymous

      Sure, I had plans to include DBL / URIDBL support to php-surblclient. I’ll add this soon.

      Thanks,
      Abhinay

  • Wouter

    great thnx

  • http://www.ecommerce-web-developers.com/ ecommerce development

    That.s sounds interesting. Good informative blog.Just loved to browse through these all articles..