PHP Classes

Robots Class: Log accesses of robots to database, email or files

Recommend this page to a friend!
  Info   Documentation   Demos   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 137 All time: 9,252 This week: 673Up
Version License PHP version Categories
robotsclass 1.1GNU General Publi...5HTTP, PHP 5, Logging
Description 

Author

This class can log accesses of robots to databases, email, or files.

It can retrieve the current HTTP request details and log them for later processing.

Currently, it can log details like the current site name, date of access, the visitor's IP address, and the browser's name or user agent identifier string.

The class can log the access details either to text files, a MySQL database, another SQL database using PDO, or send an email message to a given address.

Innovation Award
PHP Programming Innovation award nominee
February 2022
Number 2
Many sites get an excessive amount of HTTP requests from robot scripts like search engine crawlers such as Google.

The analysis of the robot access activity may be helpful to determine if in the future a site may consider those accesses as valid or ignore them to avoid a needless load of the Web server machine.

This class provides several alternatives to log the details of robot accesses like log files, email, and database table records.

Applications developers may pick different log storage container types depending on what can be better for future analysis.

Manuel Lemos
Picture of Pierre FAUQUE
  Performance   Level  
Name: Pierre FAUQUE <contact>
Classes: 18 packages by
Country: France France
Age: 77
All time rank: 15212 in France France
Week rank: 50 Up4 in France France Up
Innovation award
Innovation award
Nominee: 12x

Winner: 1x

Documentation


Details

Fri, 25 feb 2022 17:30:00 +0100 Robots Class: version 1.1 du 25/02/2022 MD5 Robots Class: 270eab0de8bb5b00ec6d3d0f10cdda9b Documentation: in separate file (fr and en) URL du site: http://www.fauque.fr Menu: Divers / T?l?chargements / Classes PHP Twitter: http://twitter.com/fr_phpuser hashtag: #ROBOTSCLASS Author: Pierre FAUQUE, pierre@fauque.net Public PGP key's author (0xF8CC4747) : -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1 mQINBEs9tXQBEACuoUiyx3ISCGUxu9DwACKe0jSRhy/fs4spUmVgw/ePNhUuIX8r RoljTWnL04kTNihI8L8PW0kA1IT5SURJ+5OXp0sMXZ9vEnk/TZwRjB+sGQPfWONJ C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Co0ZynvB71ncEbKH cuI+wTYvJcxL+F0frP4cjKy51pMU0nQKlh8qKlqw+SIRr5HONV4f1ml7cGu+T2c0 3MEcDzYezsB/7DXj15GCJs94gkV3vCVbqXSLq5rlTrH8EL7yETvoP4swmKO3e2+Z UsCaOreDH8JABSGVnlLUh2YoC5VjnGYhPIQp4n3v418lxWi0FTlG0oKH4dBsat+r TYLf/yD1Gzmb8oBB3k5XusXMmpi0MnuoiTWeKWrHRr9IEW5OOZlc4XiAhqbYN7rx r9guaapuok7BrB4LIVswzdv+FYzJ2fsYgguyZduYDbgFDD2MLtxQwgTj6r1MQSjl cA4wzJcc9tt272Fk2+0Hsj6+xkF8uTEZqtyRFG8Lrl8N1v2UPxZ4I05HuclzOWkb eX0w/84yxldMda3gir3wVVPcyx1ku03IXUlwEDP2zla4Gn+DDJShA9OcjtKsPpQ4 twINN1jgsxNeOVWfgP+4aeBNIwGNWm54Sx9SdBS2gxNXOVcvvg1WUPV1LbcnmYpk da9AdRKfbq7srHX9uH9Lxy7PoSpq0AneU8Eu3IYqKKaA6nJQxQ5JPeliQCpfMq/Z SCf1qW/pIWu0HsKsLm1IOXb4xjpEH9QhMpc= =SHbA -----END PGP PUBLIC KEY BLOCK-----

  DémoExternal page  
Screenshots (1)  
  • visit_mail.jpg
  Files folder image Files (8)  
File Role Description
Plain text file index.php Class The Robots Class itself
Accessible without login Plain text file RobotsClassDoc_fr-en.pdf Doc. Documentation of the class
Accessible without login Plain text file robots.sql Data Creation of MySQL table
Accessible without login Plain text file myrobots.txt Data Example of robots.txt file
Accessible without login Plain text file README.txt Data Infos about Class and author
Accessible without login Plain text file visits_base.txt Output Example: database
Accessible without login Plain text file visits_file.txt Output Example: file

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:137
This week:0
All time:9,252
This week:673Up