{"id":37005229,"url":"https://github.com/nggit/php-simple-uri-router","last_synced_at":"2026-01-14T00:39:52.604Z","repository":{"id":57026237,"uuid":"158143963","full_name":"nggit/php-simple-uri-router","owner":"nggit","description":"A Simple URI Router","archived":false,"fork":false,"pushed_at":"2019-03-09T00:52:06.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T17:24:36.851Z","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/nggit.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":"2018-11-19T01:14:32.000Z","updated_at":"2024-01-16T10:24:58.000Z","dependencies_parsed_at":"2022-08-23T16:20:33.664Z","dependency_job_id":null,"html_url":"https://github.com/nggit/php-simple-uri-router","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nggit/php-simple-uri-router","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nggit%2Fphp-simple-uri-router","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nggit%2Fphp-simple-uri-router/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nggit%2Fphp-simple-uri-router/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nggit%2Fphp-simple-uri-router/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nggit","download_url":"https://codeload.github.com/nggit/php-simple-uri-router/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nggit%2Fphp-simple-uri-router/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-14T00:39:51.992Z","updated_at":"2026-01-14T00:39:52.595Z","avatar_url":"https://github.com/nggit.png","language":"PHP","readme":"\u003c!-- \u003c?php /* --\u003e\n# PHP Simple URI Router Quick Tour\n**Tip:** Rename this `md` file to `php` to test it on your web server.\n\u003c!-- */ ?\u003e --\u003e\n\n    \u003c?php\n\n    require __DIR__ . '/vendor/autoload.php';\n\n    $uri = $_SERVER['QUERY_STRING'];\n    // Consider this uri: index.php?fruit.name/apple/banana/melon/orange.html\n    // QUERY_STRING will be:\n    $uri = 'fruit.name/apple/banana/melon/orange.html';\n\n    $path = new Nggit\\PHPSimpleURIRouter\\Path();\n    $path-\u003eparse($uri);\n\n### Get the first uri segment\n    echo $path-\u003efirst(); // fruit.name\n    echo '\u003cbr /\u003e';\n\n### Get the first uri segment, before certain token\n    echo $path-\u003efirst('.?\u0026'); // fruit\n    echo '\u003cbr /\u003e';\n\n### Get an uri segment after another segment\n    echo $path-\u003eafter('apple'); // banana\n    echo '\u003cbr /\u003e';\n\n### Get n uri segment after another segment\n    echo $path-\u003eafter('apple', 2); // banana/melon\n    echo '\u003cbr /\u003e';\n\n### Get all uri segment after another segment\n    echo $path-\u003eafter('apple', null); // banana/melon/orange.html\n    echo '\u003cbr /\u003e';\n\n### Get an uri segment after another segment, before certain token\n    echo $path-\u003eafter('melon', 1, '.?\u0026'); // orange\n    exit;\n\n    ?\u003e\n\nNote that one or more empty uri segment will be skipped, e.g. `apple//banana`, `$path-\u003eafter('apple')` will return banana.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnggit%2Fphp-simple-uri-router","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnggit%2Fphp-simple-uri-router","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnggit%2Fphp-simple-uri-router/lists"}