Answer the question
In order to leave comments, you need to log in
How not to run PHP code if a bot visited the site?
There is a line: $ip_data = @json_decode(file_get_contents(" www.geoplugin.net/json.gp?lang=ru&ip= " . $ip));
It is necessary to make sure that the request is not executed if it is Google or Yandex or Yahoo , etc. bot
How to implement it?
Answer the question
In order to leave comments, you need to log in
Try this lib https://packagist.org/packages/jaybizzle/crawler-detect
Well done. What you want is called CLOAKING - and this is one of the most terrible crimes against search engines, fraught with an inevitable ban. Pretty boy))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question