the safest method i would think is php
save this as link.php
Code:
<?php
$guy = $_SERVER["HTTP_REFERER"];
if ($guy == ""){
// bot/google hit
$lnk = "<a href=http://linkforbots.com>LINK</a>";
} else {
// real hit
$lnk = "<a href=http://linkforpeople.com>LINK</a>";
}
echo $lnk;
?>
use this on your pages to pull the link into your page
<? @readfile("http://www.yoursite.com/link.php") ?>