function httpbl_honeylink in http:BL 6
Same name and namespace in other branches
- 5 httpbl.module \httpbl_honeylink()
- 6.2 httpbl.module \httpbl_honeylink()
- 7 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_footer in ./
httpbl.module - Implementation of hook_footer().
File
- ./
httpbl.module, line 438 - 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 href="' . $link . '"><!-- ' . $word . ' --></a></div>';
case 1:
return '<div><a href="' . $link . '" style="display: none;">' . $word . '</a></div>';
case 2:
return '<div style="display: none;"><a href="' . $link . '">' . $word . '</a></div>';
case 3:
return '<div><a href="' . $link . '"></a></div>';
case 4:
return '<!-- <a href="' . $link . '">' . $word . '</a> -->';
case 5:
return '<div style="position: absolute; top: -250px; left: -250px;"><a href="' . $link . '">' . $word . '</a></div>';
case 6:
return '<div><a href="' . $link . '"><span style="display: none;">' . $word . '</span></a></div>';
}
}