1. Look up the User Agent authentication for a particular bot. For example, the Google crawler is represented by the user agents 'Googlebot-2.1,' 'Googlebot-Mozilla-x.x,' or 'Google-AdSense-x.x'
2. Call the 'http_user_agent' variable in the '$_SYSTEM' global array of the PHP interpreter in your script to determine the user agent of the bot:
3. Check the bot authentication against a list of bot agents. If the http_user_agent variable matches, allow the bot access:if ($agent == 'Googlebot-2.1'){
/*authentication code*/
}?>
No comments:
Post a Comment