{"id":16676377,"url":"https://github.com/thekid/shorturl","last_synced_at":"2026-05-03T23:32:29.000Z","repository":{"id":145120719,"uuid":"65661271","full_name":"thekid/shorturl","owner":"thekid","description":"URL Shortener service","archived":false,"fork":false,"pushed_at":"2023-10-01T07:46:12.000Z","size":58,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-23T19:30:35.307Z","etag":null,"topics":["json","mysql","php7","php8","rest-api","shorturl","xp-framework"],"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/thekid.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":"2016-08-14T10:29:27.000Z","updated_at":"2022-09-04T15:30:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2cbd40b-f215-4116-88e2-a36e8404dfd2","html_url":"https://github.com/thekid/shorturl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thekid/shorturl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekid%2Fshorturl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekid%2Fshorturl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekid%2Fshorturl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekid%2Fshorturl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thekid","download_url":"https://codeload.github.com/thekid/shorturl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekid%2Fshorturl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32589135,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T22:12:39.696Z","status":"ssl_error","status_checked_at":"2026-05-03T22:09:10.534Z","response_time":103,"last_error":"SSL_read: 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":["json","mysql","php7","php8","rest-api","shorturl","xp-framework"],"created_at":"2024-10-12T13:10:18.395Z","updated_at":"2026-05-03T23:32:28.985Z","avatar_url":"https://github.com/thekid.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"ShortURL\n========\n\n[![Build status on GitHub](https://github.com/thekid/shorturl/workflows/Tests/badge.svg)](https://github.com/thekid/shorturl/actions)\n[![Uses XP Framework](https://raw.githubusercontent.com/xp-framework/web/master/static/xp-framework-badge.png)](https://github.com/xp-framework/core)\n[![BSD Licence](https://raw.githubusercontent.com/xp-framework/web/master/static/licence-bsd.png)](https://github.com/xp-framework/core/blob/master/LICENCE.md)\n[![Requires PHP 7.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-7_0plus.svg)](http://php.net/)\n[![Supports PHP 8.0+](https://raw.githubusercontent.com/xp-framework/web/master/static/php-8_0plus.svg)](http://php.net/)\n![Less than 1000 lines](https://raw.githubusercontent.com/xp-framework/web/master/static/less-than-1000LOC.png)\n\nURL Shortener service\n\nSetup\n-----\nCreate a database:\n\n```sql\ncreate database HUDDLE\nuse HUDDLE\ncreate table url (id varchar(40) not null PRIMARY KEY, value varchar(1024))\ngrant all on HUDDLE.* to 'huddle'@'%' identified by '...'\n```\n\nRun composer:\n\n```sh\n$ composer install\n# ...\n```\n\nRunning\n-------\nStart the server:\n\n```sh\n$ export HUDDLE_PASS=...\n$ xp -supervise web -c src/main/etc/prod de.thekid.shorturl.Api\n```\n\nWorking with the service\n------------------------\n\nCreate a URL:\n\n```sh\n$ curl -i localhost:8080 -d \"url=https://github.com/\"\nHTTP/1.1 201\nDate: Sun, 14 Aug 2016 10:25:39 GMT\nLocation: /d7b3438\n```\n\nAccess the URL:\n\n```sh\n$ curl -i localhost:8080/d7b3438\nHTTP/1.1 302\nDate: Sun, 14 Aug 2016 10:26:17 GMT\nLocation: https://github.com/\n```\n\nCreate a named URL:\n\n```sh\n$ curl -i localhost:8080 -d \"url=http://thekid.de/\u0026name=home\"\nHTTP/1.1 201\nDate: Sun, 14 Aug 2016 10:25:39 GMT\nLocation: /home\n```\n\nAdministering the service\n-------------------------\n\nList URLs:\n\n```sh\n$ curl -i admin:$HUDDLE_PASS@localhost:8080\nHTTP/1.1 200\nDate: Sun, 14 Aug 2016 10:39:42 GMT\nContent-Type: application/json\n\n[{\"id\":\"d7b3438\",\"value\":\"https://github.com/\"},{\"id\":\"home\",\"value\":\"http://thekid.de/\"}]\n```\n\nDelete URLs:\n\n```sh\n$ curl -i -X DELETE admin:$HUDDLE_PASS@localhost:8080/d7b3438\nHTTP/1.1 204\nDate: Sun, 14 Aug 2016 10:38:26 GMT\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekid%2Fshorturl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthekid%2Fshorturl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekid%2Fshorturl/lists"}