{"id":16233530,"url":"https://github.com/karser/phptest-logs","last_synced_at":"2025-04-08T07:38:36.207Z","repository":{"id":25867367,"uuid":"29307348","full_name":"karser/phptest-logs","owner":"karser","description":null,"archived":false,"fork":false,"pushed_at":"2015-01-15T17:09:11.000Z","size":196,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T04:48:37.236Z","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/karser.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":"2015-01-15T16:51:19.000Z","updated_at":"2015-04-06T19:51:53.000Z","dependencies_parsed_at":"2022-07-27T05:46:15.042Z","dependency_job_id":null,"html_url":"https://github.com/karser/phptest-logs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karser%2Fphptest-logs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karser%2Fphptest-logs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karser%2Fphptest-logs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karser%2Fphptest-logs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karser","download_url":"https://codeload.github.com/karser/phptest-logs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247798839,"owners_count":20998068,"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-10T13:12:59.613Z","updated_at":"2025-04-08T07:38:36.155Z","avatar_url":"https://github.com/karser.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## How to run\nPlease run this script with php\n```bash\nphp -S localhost:8000 ./web/index.php\n```\nOr setup your web server ./web/index.php as document root\n\nYou can use ./testlog for testing purpose.\n\n## How it looks\n![upload](https://raw.githubusercontent.com/karser/phptest-logs/master/1.png?raw=true)\n![statistics](https://raw.githubusercontent.com/karser/phptest-logs/master/2.png?raw=true)\n\n\n## Task description\nFor this exercise, we want to print a report about the usage of an Apache web server, based on the access logs.\nTo do that we'll build a simple page including a form that will allow us to upload a log file.\nWhen the file is uploaded, the script will analyze its contents and print the following:\n- number of hits / day (for each day)\n- number of unique visitors / day (for each day)\n- average number of hits / visitor (for the whole period)\n\nLog format:\n```\n192.168.1.1 - - [16/Feb/2014:06:44:00 +0000] \"GET /images/icon.png HTTP/1.1\" 200 1331 \"http://www.example.com/index.html\" \"Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari/9537.53\"\n```\n\nDo not use any Javascript or CSS, we just want a PHP/HTML page (in core PHP, no framework).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarser%2Fphptest-logs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarser%2Fphptest-logs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarser%2Fphptest-logs/lists"}