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