appstore-reviews-parser/parser
Composer 安装命令:
composer require appstore-reviews-parser/parser
包简介
A standalone PHP library for parsing App Store reviews from iTunes RSS feed
README 文档
README
A standalone PHP library for fetching and parsing App Store customer reviews from the iTunes RSS feed.
Features
- Fetch reviews from any App Store (country-specific)
- Support for pagination (up to 10 pages)
- Sort by most recent or most helpful reviews
- Minimal dependencies - only requires PHP 8.0+
- Comprehensive error handling
- Rate limiting detection
- Returns normalized JSON data structure
- Create parser from JSON configuration
Requirements
- PHP 8.0 or higher
- SimpleXML extension (usually included with PHP)
Installation
Install via Composer:
composer require appstore-reviews-parser/parser
Or add to your composer.json:
{
"require": {
"appstore-reviews-parser/parser": "^1.0"
}
}
Usage
Using Method Chaining (Fluent Interface)
You can create a parser instance and configure it using method chaining:
use AppStoreReviewsParser\AppStoreReviewsParser; // Create parser with method chaining $parser = new AppStoreReviewsParser(); $result = $parser->setAppId('123456789') ->setCountry('us') ->setPage(1) ->setSortBy('mostrecent') ->setTimeout(30) ->fetch(); if ($result['success']) { foreach ($result['data'] as $review) { echo "Rating: {$review['rating']} - {$review['title']}\n"; } } else { echo "Error: " . $result['error']; }
Using JSON Configuration
You can create a parser instance by passing a JSON string with configuration:
use AppStoreReviewsParser\AppStoreReviewsParser; $jsonConfig = '{ "app_id": "123456789", "country": "us", "page": 1, "sort_by": "mostrecent", "timeout": 30 }'; try { $parser = AppStoreReviewsParser::createFromJson($jsonConfig); $result = $parser->fetch(); if ($result['success']) { print_r($result['data']); } else { echo "Error: " . $result['error']; } } catch (Exception $e) { echo "Exception: " . $e->getMessage(); }
See examples/examples.php for more usage examples.
Available Configuration Options
app_id: Apple App Store ID (required unless using app_url with parse_from_url)app_url: App Store URL to parse App ID fromparse_from_url: Whether to parse App ID from app_url (default: false). When true, app_id can be omittedcountry: Two-letter country code (default: "us")page: Page number 1-10 (default: 1)sort_by: "mostrecent" or "mosthelpful" (default: "mostrecent")timeout: Request timeout in seconds (default: 30)user_agent: Custom user agent string
Response Format
The parser returns a JSON object with the following structure:
{
"success": true,
"data": [
{
"id": "1234567890",
"title": "Great app!",
"content": "I really love using this app. It helps me a lot.",
"rating": 5,
"author": "John Doe",
"version": "1.2.3",
"vote_count": 42,
"vote_sum": 168,
"country": "us",
"date": "2024-01-15T10:30:00+00:00"
}
],
"meta": {
"app_id": "123456789",
"country": "us",
"page": 1,
"total_pages": 10,
"total_reviews": 50,
"sort_by": "mostrecent"
},
"error": null
}
Response Fields
success(boolean): Indicates whether the request was successfuldata(array): Array of review objects, each containing:id(string): Unique review identifiertitle(string): Review titlecontent(string): Review text contentrating(integer): Star rating (1-5)author(string): Name of the reviewerversion(string): App version the review was written forvote_count(integer): Number of votes the review receivedvote_sum(integer): Sum of all vote scorescountry(string): Country code of the App Storedate(string): ISO 8601 formatted date of the review
meta(object): Metadata about the request (only present on success):app_id(string): App Store IDcountry(string): Country code usedpage(integer): Current page numbertotal_pages(integer): Total available pages (max 10)total_reviews(integer): Number of reviews returnedsort_by(string): Sort order used
error(string|null): Error message if the request failed, null otherwise
appstore-reviews-parser/parser 适用场景与选型建议
appstore-reviews-parser/parser 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 09 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「parser」 「itunes」 「rss」 「appstore」 「reviews」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 appstore-reviews-parser/parser 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 appstore-reviews-parser/parser 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 appstore-reviews-parser/parser 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Easy to use SDK with grabber for multiple platforms at once like YouTube, Dailymotion, Facebook and more.
Generate RSS feed for podcast, including iTunes, RawVoice, DublinCore and syndication fields.
An MT940 bank statement parser for PHP
A library that implements the App Store API (Server API and Connect API) and facilitates App Store Server Notifications V2
PHP library to find podcasts
PHP receipt validator for Apple iTunes, Google Play and Amazon App Store
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 34
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-09