I want to hide my source codes. I want incoming users to see the try.html page. I want google bots to see the real page. How can I use the code below? Where on the page should I add it?
<?php
if (preg_match('/googlebot|SemrushBot/i', $_SERVER['HTTP_USER_AGENT'])) {
// Bot yes
//echo "bot yes";
} else {
// Bot no
//echo "bot no";
echo <<<EOF
?>
I tried the code above. Google bot does not see my website.