{"id":20672794,"url":"https://github.com/selective-php/rar","last_synced_at":"2025-04-19T19:10:28.025Z","repository":{"id":45403284,"uuid":"200882078","full_name":"selective-php/rar","owner":"selective-php","description":"RAR file reader for PHP","archived":false,"fork":false,"pushed_at":"2023-09-09T21:17:13.000Z","size":60,"stargazers_count":20,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T12:04:46.558Z","etag":null,"topics":["php","rar","rar-archives","rar-files","rar-format"],"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/selective-php.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}},"created_at":"2019-08-06T15:51:52.000Z","updated_at":"2024-10-23T18:37:20.000Z","dependencies_parsed_at":"2022-07-21T02:34:36.054Z","dependency_job_id":null,"html_url":"https://github.com/selective-php/rar","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selective-php%2Frar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selective-php%2Frar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selective-php%2Frar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/selective-php%2Frar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/selective-php","download_url":"https://codeload.github.com/selective-php/rar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248929393,"owners_count":21184849,"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","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":["php","rar","rar-archives","rar-files","rar-format"],"created_at":"2024-11-16T20:38:50.124Z","updated_at":"2025-04-19T19:10:27.994Z","avatar_url":"https://github.com/selective-php.png","language":"PHP","readme":"# selective/rar\n\nRAR file reader for PHP.\n\n[![Latest Version on Packagist](https://img.shields.io/github/release/selective-php/rar.svg)](https://packagist.org/packages/selective/rar)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)\n[![Build Status](https://github.com/selective-php/rar/workflows/build/badge.svg)](https://github.com/selective-php/rar/actions)\n[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/selective-php/rar.svg)](https://scrutinizer-ci.com/g/selective-php/rar/code-structure)\n[![Quality Score](https://img.shields.io/scrutinizer/quality/g/selective-php/rar.svg)](https://scrutinizer-ci.com/g/selective-php/rar/?branch=master)\n[![Total Downloads](https://img.shields.io/packagist/dt/selective/rar.svg)](https://packagist.org/packages/selective/rar/stats)\n\n## Features\n\n* Read RAR file information\n* RAR 5 archive format\n* RAR 4 archive format\n* No dependencies\n* Very fast\n\nNote: This package does not support extracting / unpacking rar archives.\n\n## Requirements\n\n* PHP 8.1+\n\n\u003e The [PECL RAR package](https://www.php.net/manual/en/book.rar.php) is **NOT** required\n\n## Installation\n\n```\ncomposer require selective/rar\n```\n\n## Usage\n\n### Open RAR file\n\n```php\nuse Selective\\Rar\\RarFileReader;\nuse SplFileObject;\n\n$rarFileReader = new RarFileReader();\n$rarArchive = $rarFileReader-\u003eopenFile(new SplFileObject('test.rar'));\n\nforeach ($rarArchive-\u003egetEntries() as $entry) {\n    echo $entry-\u003egetName() . \"\\n\";\n}\n```\n\n### Open in-memory RAR file\n\n```php\nuse Selective\\Rar\\RarFileReader;\nuse SplTempFileObject;\n\n$file = new SplTempFileObject();\n$file-\u003efwrite('my binary rar content');\n\n$rarFileReader = new RarFileReader();\n$rarArchive = $rarFileReader-\u003eopenFile($file);\n\nforeach ($rarArchive-\u003egetEntries() as $entry) {\n    echo $entry-\u003egetName() . \"\\n\";\n}\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselective-php%2Frar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fselective-php%2Frar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fselective-php%2Frar/lists"}