Googlebot detection library

An example of determining the belonging of GoogleBot to the Google search engine, in PHP - Googlebot detection library

An example of determining the belonging of GoogleBot to the Google search engine

Very often, attackers crawl websites to, for example, pass content, posing as a Google search engine bot. Attackers perform this simple trick by passing a User-Agent header containing the same information as in the headers of a real bot: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)

Such actions of cybercriminals can not only create unnecessary load on your Internet servers, but also crawl the content of your sites without your consent.

In order to prevent unwanted activity of fake bots impersonating GoogleBot, you can use the following PHP code example (Googlebot detection library):

if (strpos($_SERVER['HTTP_USER_AGENT'],'Googlebot') !== false) {
	$iphost = gethostbyaddr($_SERVER['REMOTE_ADDR']);
	if (substr($iphost, -10) != "google.com" && substr($iphost, -13) != "googlebot.com")
		echo "It's a fake GoogleBot! :(";
	else
		echo "It's a real GoogleBot! :)";
}

This way, you can prevent unwanted activity from bots that are not related to the Google search engine.

Free online tools and services for webmasters and website owners

Qwerty Networks

Become a customer or partner
Our manager will contact with you in a few working hours!

Your data is protected and stored in an encrypted form.

We have undeniable advantages

We are unique

Our company is one of the few integrators in the international market that offers the commercial deployment of real social networks based on powerful scalable solutions, projects that can handle multimillion web traffic and have almost unlimited development potential.

We create IT

Many large Internet projects use our know-how. You have probably come across them many times, not even suspecting that our solutions are in the technology pool! Relying on our many years of experience and achievements, we can safely say that "We create IT"!

A wide range of projects

Our experience in IT is colossal. Our skilled specialists develop and support high-performance web projects, portals, international social networks, artificial intelligence systems, payment systems and aggregators.

Qwerty Networks Infrastructure

Analogously well-known Internet giants, we create, use and grow our own infrastructure that allows us to serve large Internet projects (for example, social networks), including our company's cloud solutions based on artificial intelligence.

Ready for co-investment

We are ready to conclude an agreement on joint co-investment and finance development up to 60%, if we like the idea of your project. We can also provide additional preferences to that project and help with reaching the second investment round.

Synergy with QAIM

We have developed QAIM secure messenger - the great platform for secure communications, integrated into all our projects. This product is similar in its capabilities to the well-known Telegram messenger, but provides more serious user privacy.

Your success is the key to our reputation!

We are focused on results rather than on short-term profits. We just like our job and have been doing it since 2001! We do not waste your time and carry out only those projects, in which we are confident. Qwerty Networks team took an active part in the creation of many well-known social networks and projects at various times.

Individual approach

In our work, we adhere to the tactics of an individual approach to each client. This method allows us to achieve success in solutions of any complexity. With us you will feel comfortable as at home!

Download company presentation
Ivan Morohin

«Perhaps the only team in the European market that offers the creation of really horizontally-scalable social networks, portals and artificial intelligence systems at an affordable price.»

5
Marat Guelman

«Thanks to the Qwerty Networks team for creating my digital personality, the Marat 3.0 avatar based on the Qwerty AI system. It's fantastic. Virtual Marat is ready to communicate with you on the guelman.me. Marat 3.0 is smarter than me - speaks different languages. And he is more responsible than me, because he answers 24 hours a day. Welcome to my site, visit and communicate with my electronic copy!»

5