{"id":24531495,"url":"https://github.com/s4k1dl0/bot-analytics-with-php","last_synced_at":"2026-05-08T17:31:26.813Z","repository":{"id":258811857,"uuid":"875747215","full_name":"S4k1dl0/Bot-Analytics-with-PHP","owner":"S4k1dl0","description":"A PHP-based application for detecting and logging bot activity on your website. This project utilizes CrawlerDetect to differentiate between human users and crawlers, storing relevant data in a MySQL database.","archived":false,"fork":false,"pushed_at":"2024-10-20T19:02:08.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T20:14:57.920Z","etag":null,"topics":["bot-analytics","bot-report","composer","crawler-detection","mysql","mysql-database","php","php-pdo"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/S4k1dl0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-20T18:33:27.000Z","updated_at":"2025-01-19T17:37:19.000Z","dependencies_parsed_at":"2024-10-20T22:46:34.373Z","dependency_job_id":null,"html_url":"https://github.com/S4k1dl0/Bot-Analytics-with-PHP","commit_stats":null,"previous_names":["sakidlo/bot-analytics-with-php","s4k1dl0/bot-analytics-with-php"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S4k1dl0%2FBot-Analytics-with-PHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S4k1dl0%2FBot-Analytics-with-PHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S4k1dl0%2FBot-Analytics-with-PHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S4k1dl0%2FBot-Analytics-with-PHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/S4k1dl0","download_url":"https://codeload.github.com/S4k1dl0/Bot-Analytics-with-PHP/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243785085,"owners_count":20347409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot-analytics","bot-report","composer","crawler-detection","mysql","mysql-database","php","php-pdo"],"created_at":"2025-01-22T09:15:08.443Z","updated_at":"2026-05-08T17:31:26.752Z","avatar_url":"https://github.com/S4k1dl0.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bot Analytics With PHP\n\nA PHP-based application for detecting and logging bot activity on your website. This project utilizes CrawlerDetect to differentiate between human users and crawlers, storing relevant data in a MySQL database.\n\n## Features\n\n- Detects various web crawlers and bots using the CrawlerDetect library.\n- Logs bot activity with relevant details such as IP address, user agent, domain name, full path, and check value.\n- Sends email notifications to the admin when a bot is detected.\n- Stores data in a MySQL database for easy retrieval and analysis.\n\n## Prerequisites\n\n- PHP 7.0 or higher\n- MySQL\n- Composer (for installing dependencies)\n- A web server (Apache/Nginx) configured to run PHP\n\n## Installation\n\n### 1. Install dependencies\n\nMake sure you have Composer installed, then run:\n\n```bash\ncomposer install\n\n```\n\n- install CrawlerDetect\n\nYou need to install the [CrawlerDetect](https://github.com/JayBizzle/Crawler-Detect/) library using Composer:\n\n```bash\ncomposer require jaybizzle/crawler-detect\n```\n\n### 2. Set up the database\n\nCreate a MySQL database and run the SQL commands. Look in the `info.txt` file to create the necessary tables\n\n### 3. Configure the project\n\nUpdate the `config/config.php` file with your database connection details and admin email address.\n\n### 4. Set up your web server\n\nMake sure your web server is configured to serve the `public` directory. You may need to adjust the document root settings.\n\n### 6. Access the application\n\nOpen your web browser and navigate to your server's URL followed by `/stat.php` to start monitoring bot activity.\n\n### Additional steps:\nYou can test your project by running the server:\n\n```bash\nphp -S localhost:8000 -t public\n\n```\n\n## Usage\n\nOnce set up, the application will automatically log bot visits to the `bot_data` table in the database and send email notifications when a bot is detected.\n\n## Logging\n\nLogs are stored in the `logs/bot-analytics.log` file. You can check this file for any errors or additional information about the bot detections.\n\n## Acknowledgments\n\n[CrawlerDetect](https://github.com/JayBizzle/Crawler-Detect/) The web used library for this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs4k1dl0%2Fbot-analytics-with-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs4k1dl0%2Fbot-analytics-with-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs4k1dl0%2Fbot-analytics-with-php/lists"}