function httpbl_honeylink in http:BL 7
Same name and namespace in other branches
- 5 httpbl.module \httpbl_honeylink()
- 6.2 httpbl.module \httpbl_honeylink()
- 6 httpbl.module \httpbl_honeylink()
Return HTML code with hidden Honeypot link in one of the many styles.
Parameters
string $link:
string $word:
Return value
string
2 calls to httpbl_honeylink()
- httpbl_boot in ./
httpbl.module - Implementation of hook_boot()
- httpbl_page_build in ./
httpbl.module - Implements hook_page_build().
File
- ./
httpbl.module, line 393 - Implementation of http:BL for Drupal. It provides IP-based blacklisting through http:BL and allows linking to a honeypot.
Code
function httpbl_honeylink($link, $word) {
if (!$link) {
return;
}
switch (mt_rand(0, 6)) {
case 0:
return '<div><a rel="nofollow" href="' . $link . '"><!-- ' . $word . ' --></a></div>';
case 1:
return '<div><a rel="nofollow" href="' . $link . '" style="display: none;">' . $word . '</a></div>';
case 2:
return '<div style="display: none;"><a rel="nofollow" href="' . $link . '">' . $word . '</a></div>';
case 3:
return '<div><a rel="nofollow" href="' . $link . '"></a></div>';
case 4:
return '<!-- <a href="' . $link . '">' . $word . '</a> -->';
case 5:
return '<div style="position: absolute; top: -250px; left: -250px;"><a rel="nofollow" href="' . $link . '">' . $word . '</a></div>';
case 6:
return '<div><a rel="nofollow" href="' . $link . '"><span style="display: none;">' . $word . '</span></a></div>';
}
}