I have two PHP scripts which I would love to have them in a Perl version: <?php
if ($_GET["bots"] == "nocrawl") {
$find = array
(
"&bots=nocrawl",
"?bots=nocrawl"
);
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.example.com".str_replace($find, '', $_SERVER['REQUEST_URI']));
}
?>
and
<?php
if (!stristr($_SERVER['HTTP_USER_AGENT'], 'googlebot')) {
echo '<p class="optout"><a href="/mailing-list/index.php" title="Opt-out">Unsubscribe Newsletter</a>.</p>';
}
?>
can someone help me please?
Thanks a lot in advance.
[edited by: eelixduppy at 1:28 am (utc) on Mar. 11, 2009]
[edit reason] switched to example.com [/edit]