{"id":16102582,"url":"https://github.com/abbe98/request-logging","last_synced_at":"2025-04-06T01:12:36.143Z","repository":{"id":20634992,"uuid":"23916761","full_name":"Abbe98/request-logging","owner":"Abbe98","description":"Request logging library for PHP.","archived":false,"fork":false,"pushed_at":"2014-10-04T11:50:35.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T22:42:12.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Abbe98.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}},"created_at":"2014-09-11T12:11:56.000Z","updated_at":"2015-11-16T12:55:54.000Z","dependencies_parsed_at":"2022-08-21T06:50:50.600Z","dependency_job_id":null,"html_url":"https://github.com/Abbe98/request-logging","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abbe98%2Frequest-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abbe98%2Frequest-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abbe98%2Frequest-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abbe98%2Frequest-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abbe98","download_url":"https://codeload.github.com/Abbe98/request-logging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419871,"owners_count":20936013,"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":[],"created_at":"2024-10-09T18:54:09.830Z","updated_at":"2025-04-06T01:12:36.114Z","avatar_url":"https://github.com/Abbe98.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#request-logging\n\n*Request logging library in PHP*\n\n##Installation\n\nInclude `rqeuest_logging.php` or add the [composer package][0].\n\nDefine the database configuration:\n\n\tdefine('HOST', '127.0.0.1'); // the IP of the database\n\tdefine('DBNAME', 'reqlog_test'); // the database name to be used\n\tdefine('USERNAME', 'root'); // the username to be used with the database\n\tdefine('PASSWORD', ''); // the password to be used with the username\n\nAnd run the following SQL in the database you defined above:\n\n\tCREATE TABLE IF NOT EXISTS `requests` (\n\t`id` int(255) NOT NULL,\n\t  `ip` varchar(45) COLLATE utf8mb4_bin NOT NULL,\n\t  `http_forwared` int(45) NOT NULL,\n\t  `browser_ua` varchar(600) COLLATE utf8mb4_bin NOT NULL,\n\t  `timestamp` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),\n\t  `tag` varchar(700) COLLATE utf8mb4_bin NOT NULL\n\t) ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin AUTO_INCREMENT=27 ;\n\t\n\tALTER TABLE `requests`\n\t ADD PRIMARY KEY (`id`);\n\t\n\tALTER TABLE `requests`\n\tMODIFY `id` int(255) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=27;\n\n##Usage\n\nLog the current request(IP, HTTP forwarded, Browser User Agent and Time Samp). The `$tagString` is optional:\n\n`$log = new ReqLog($tagString);`\n\nGet the number of visits from the current computer/browser(by adding `$tagString` you get the tag specific data):\n\n`$log-\u003enum_visits();`\n\nGet the number of visits from the current computer(`$tagString` is optional):\n\n`$log-\u003enum_ip_visits();`\n\nGet the percent that the current browser version has(`$tagString` is not supported):\n\n`$log-\u003ethis_browser_percent();`\n\n**Licensed under MIT.**\n\n[0]: https://packagist.org/packages/abbe98/request-logging\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbe98%2Frequest-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabbe98%2Frequest-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbe98%2Frequest-logging/lists"}