{"id":20434370,"url":"https://github.com/centralnicgroup-opensource/rtldev-middleware-php-idna-translator","last_synced_at":"2025-10-09T18:37:18.495Z","repository":{"id":229170201,"uuid":"773925271","full_name":"centralnicgroup-opensource/rtldev-middleware-php-idna-translator","owner":"centralnicgroup-opensource","description":"PHP IDN Converter for Domain Names","archived":false,"fork":false,"pushed_at":"2025-09-22T03:12:31.000Z","size":1435,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-22T05:31:08.843Z","etag":null,"topics":[],"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/centralnicgroup-opensource.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-03-18T16:30:55.000Z","updated_at":"2025-09-22T03:12:34.000Z","dependencies_parsed_at":"2024-04-10T05:24:30.313Z","dependency_job_id":"77334777-033b-446f-b34c-55055f0e5bcc","html_url":"https://github.com/centralnicgroup-opensource/rtldev-middleware-php-idna-translator","commit_stats":null,"previous_names":["centralnicgroup-opensource/rtldev-middleware-php-idna-translator"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/centralnicgroup-opensource/rtldev-middleware-php-idna-translator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralnicgroup-opensource%2Frtldev-middleware-php-idna-translator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralnicgroup-opensource%2Frtldev-middleware-php-idna-translator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralnicgroup-opensource%2Frtldev-middleware-php-idna-translator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralnicgroup-opensource%2Frtldev-middleware-php-idna-translator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centralnicgroup-opensource","download_url":"https://codeload.github.com/centralnicgroup-opensource/rtldev-middleware-php-idna-translator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralnicgroup-opensource%2Frtldev-middleware-php-idna-translator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001895,"owners_count":26083226,"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-10-09T02:00:07.460Z","response_time":59,"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":[],"created_at":"2024-11-15T08:26:14.916Z","updated_at":"2025-10-09T18:37:18.434Z","avatar_url":"https://github.com/centralnicgroup-opensource.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IDN Converter - Convert IDN to Punycode or Punycode to IDN - PHP Library\n\nThe IDN Converter PHP Library provides a simple and efficient solution for converting Internationalized Domain Names (IDNs) to Punycode and vice versa in PHP applications. With the `ConverterFactory` class, developers can seamlessly handle domain string conversions between Unicode and Punycode formats, ensuring compatibility and consistency across different systems.\n\n### Key Features:\n- Convert domain strings to Unicode and Punycode formats effortlessly.\n- Supports conversion of single domain strings as well as bulk conversion of multiple domains.\n- Intuitive API with easy-to-use methods for domain conversion.\n- Comprehensive API documentation for easy integration and usage.\n\n**Get Started:** Install the library via Composer and follow the usage examples in the README to start converting domain strings efficiently in your PHP projects.\n\n## Installation\n\nYou can install the IDN Converter PHP Library via Composer. Run the following command in your terminal:\n\n```bash\ncomposer require centralnic-reseller/idn-converter\n```\n\n## Use Cases\n\n- **Domain Conversion**: Convert domain strings between Unicode and Punycode formats to ensure compatibility and consistency across different systems.\n\n## Usage\n\n### 1. Convert a Domain String to Unicode\n\n```php\n\u003c?php\n\nuse CNIC\\IDNA\\Factory\\ConverterFactory;\n\n// Convert a domain string to Unicode format\n$domain = \"example.com\";\n$unicodeDomain = ConverterFactory::toUnicode($domain);\necho \"Unicode Domain: $unicodeDomain\\n\";\n```\n\n### 2. Convert a Domain String to Punycode\n\n```php\n\u003c?php\n\nuse CNIC\\IDNA\\Factory\\ConverterFactory;\n\n// Convert a domain string to Punycode format\n$unicodeDomain = \"example.com\";\n$punycodeDomain = ConverterFactory::toASCII($unicodeDomain);\necho \"Punycode Domain: $punycodeDomain\\n\";\n```\n\n### 3. Convert Multiple Domain Strings\n\n```php\n\u003c?php\n\nuse CNIC\\IDNA\\Factory\\ConverterFactory;\n\n// Convert multiple domain strings to Unicode and Punycode formats\n$domains = [\"example.com\", \"münchen.de\", \"рф.ru\"];\n$convertedDomains = ConverterFactory::convert($domains);\nforeach ($convertedDomains as $domain) {\n    echo \"Unicode Domain: {$domain['IDN']}, Punycode Domain: {$domain['PUNYCODE']}\\n\";\n}\n```\n\n## API Documentation\n\n```php\n### `ConverterFactory::toUnicode($keyword, $options = [])`\n\nConverts a domain string to Unicode format.\n\n- **Parameters:**\n  - `$keyword` (string): The domain string to convert.\n  - `$options` (array): Additional options for the conversion process (optional).\n- **Returns:** The converted domain in Unicode format, or `false` if the keyword is empty.\n\n### `ConverterFactory::toASCII($keyword, $options = [])`\n\nConverts a domain string to Punycode format.\n\n- **Parameters:**\n  - `$keyword` (string): The domain string to convert.\n  - `$options` (array): Additional options for the conversion process (optional).\n- **Returns:** The converted domain in Punycode format, or `false` if the keyword is empty.\n```\n\n**License:** This library is distributed under the MIT License, allowing for flexibility in usage and modification.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentralnicgroup-opensource%2Frtldev-middleware-php-idna-translator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentralnicgroup-opensource%2Frtldev-middleware-php-idna-translator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentralnicgroup-opensource%2Frtldev-middleware-php-idna-translator/lists"}