You are here

function _httpbl_cache_get in http:BL 7

Same name and namespace in other branches
  1. 5 httpbl.module \_httpbl_cache_get()
  2. 6.2 httpbl.module \_httpbl_cache_get()
  3. 6 httpbl.module \_httpbl_cache_get()

Get IP host's status value from cache table

1 call to _httpbl_cache_get()
httpbl_check in ./httpbl.module
Check if an IP should be banned

File

./httpbl.module, line 692
Implementation of http:BL for Drupal. It provides IP-based blacklisting through http:BL and allows linking to a honeypot.

Code

function _httpbl_cache_get($ip) {
  return db_select('httpbl', 'h')
    ->fields('h', array(
    'status',
  ))
    ->condition('hostname', $ip)
    ->range(0, 1)
    ->execute()
    ->fetchField();
}