{"id":22930935,"url":"https://github.com/mohammadreza-73/web-server","last_synced_at":"2026-03-20T00:01:35.654Z","repository":{"id":129120265,"uuid":"374054022","full_name":"Mohammadreza-73/Web-server","owner":"Mohammadreza-73","description":"Simple PHP Web Server","archived":true,"fork":false,"pushed_at":"2021-06-07T04:50:03.000Z","size":1103,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T17:24:56.590Z","etag":null,"topics":["web-server","web-socket"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mohammadreza-73.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-06-05T07:50:24.000Z","updated_at":"2023-05-29T09:43:21.000Z","dependencies_parsed_at":"2023-04-03T14:04:49.962Z","dependency_job_id":null,"html_url":"https://github.com/Mohammadreza-73/Web-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mohammadreza-73/Web-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohammadreza-73%2FWeb-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohammadreza-73%2FWeb-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohammadreza-73%2FWeb-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohammadreza-73%2FWeb-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mohammadreza-73","download_url":"https://codeload.github.com/Mohammadreza-73/Web-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mohammadreza-73%2FWeb-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270086788,"owners_count":24524644,"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","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["web-server","web-socket"],"created_at":"2024-12-14T10:32:16.933Z","updated_at":"2026-03-20T00:01:35.601Z","avatar_url":"https://github.com/Mohammadreza-73.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple PHP Web Server\nThis is a simple project to understand how web servers work.\nPHP is a scripting language that simply is not really designed for such tasks.\n\n## Basics\n### How does a webserver basically work?\n1. The server listens for incoming connections.\n2. A client connects to the server.\n3. The server accepts the connection and handles the input.\n4. The server responds to client.\n\n## Usage\nInstall dependencies in your directory\n```bash\ncomposer install\n```\n\nStart server just like this:\n```bash\n$ sudo php server 8000\n```\nAnd access it with your browser:\n```.http\nhttp: localhost:8000/some-uri/?projcet=web-server\n```\n**Note:** You can use any port you want.\n\nOutput:\n```code\nWebServer\\Request Object\n(\n    [method:WebServer\\Request:private] =\u003e GET\n    [uri:WebServer\\Request:private] =\u003e /some-uri?project=web-server\n    [headers:WebServer\\Request:private] =\u003e Array\n        (\n            [Host] =\u003e localhost:8000\n            [User-Agent] =\u003e Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100102 Firefox/87.0\n            [Accept] =\u003e text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8\n            [Accept-Language] =\u003e en-US,en;q=0.5\n            [Accept-Encoding] =\u003e gzip, deflate\n            [Connection] =\u003e keep-alive\n            [Upgrade-Insecure-Requests] =\u003e 1\n        )\n\n    [params:WebServer\\Request:private] =\u003e Array\n        (\n            [project] =\u003e web-server\n        )\n\n    [buffer_max_size] =\u003e 4096\n)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadreza-73%2Fweb-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohammadreza-73%2Fweb-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohammadreza-73%2Fweb-server/lists"}