{"id":37716742,"url":"https://github.com/ajepe/base62","last_synced_at":"2026-01-16T13:27:37.249Z","repository":{"id":56943082,"uuid":"64054256","full_name":"ajepe/base62","owner":"ajepe","description":"Converts numeric value to base 62","archived":false,"fork":false,"pushed_at":"2018-07-18T09:31:19.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-08-31T03:41:08.838Z","etag":null,"topics":["base62","decoder","encoder"],"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/ajepe.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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":"2016-07-24T07:36:17.000Z","updated_at":"2018-07-18T09:31:20.000Z","dependencies_parsed_at":"2022-08-21T02:10:22.137Z","dependency_job_id":null,"html_url":"https://github.com/ajepe/base62","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/ajepe/base62","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajepe%2Fbase62","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajepe%2Fbase62/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajepe%2Fbase62/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajepe%2Fbase62/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajepe","download_url":"https://codeload.github.com/ajepe/base62/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajepe%2Fbase62/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":["base62","decoder","encoder"],"created_at":"2026-01-16T13:27:37.189Z","updated_at":"2026-01-16T13:27:37.242Z","avatar_url":"https://github.com/ajepe.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ajepe/base62.svg?branch=master)](https://travis-ci.org/ajepe/base62)\r\n## BASE62 \r\nBase is a small package that encodes integer to a string and decodes the same string back to an integer, this is can useful in making  URL shortening application or generating unique URL slug. It convert the __int__ id to base 62 characters with the encode method and converts it back to an integer with the decode public method.\r\n\r\n* It converts non-negative integer number like _42000000_  up to _PHP\\_INT\\_SIZE_ of the platform in which the package is being use on into a string like _2Qe7m_. The action is reversible.\r\n* It can also decode the id back from _2Qe7m_ to _42000000_.\r\n* This is useful in youtube like url or simply using them making url shortening website.\r\n\r\n\r\n### Install\r\n\r\nVia Composer\r\n``` bash\r\ncomposer require ajepe/base62:0.0.2\r\n```\r\n\r\n### Usage\r\n\r\n``` php\r\nrequire 'vendor/autoload.php';\r\n\r\n\r\n$encode = new Base\\Encode();\r\n$decode = new Base\\Decode();\r\n$encode = $encode-\u003eencode(PHP_INT_MAX); //return HXy0p9\r\n$decode = $decode-\u003edecode($encode); // return 24815682095\r\nprintf('The encode value of %s map directly to %s', $encode, $decode);\r\n\r\n```\r\n[README.md](README.md), [CHANGELOG.md](CHANGELOG.md), [CONTRIBUTING.md](CONTRIBUTING.md), [LICENSE.txt](LICENSE) and [composer.json](composer.json)\r\n\r\n## Change log\r\n\r\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajepe%2Fbase62","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajepe%2Fbase62","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajepe%2Fbase62/lists"}