dajoho/itunes-php
Composer 安装命令:
composer require dajoho/itunes-php
包简介
Parse an iTunes XML file (the full library or partial export) for its info, tracks and playlists. Original work by Robert A. Wallis, with PHP5 support by Peter Minarik.
README 文档
README
A class to extract info, tracks and playlists from an iTunes XML file.
Original code copyright (c) 2003 by Robert A. Wallis. Dicked around with in 2005 by Peter Minarik, and in 2013 by Conan Theobald.
LGPL licensed: See LICENSE
About
A simple PHP class that will read an iTunes XML file and convert the info, tracks and playlists contained within into an array of objects.
Tracks can be matched to playlist-items by running the #processPlaylists()
method after opening your XML file.
Supports sorting fields by string, number, and date.
Instructions
See example.php for a basic implementation.
require_once 'iTunesXMLparser.class.php'; $xml_path = 'iTunes playlist export.xml'; $itunes = new iTunesXMLParser(); $itunes->sort_field = 'Track ID'; $itunes->sort_direction = 'ascending'; $itunes->open( $xml_path ); /* "$itunes->data" is now available. print_r to see what's inside: print_r( $itunes->data ); */
For conversion to JSON, I recommend using the jsbeautifier.org
PHP port.
Credits
Based on work by:
The original author, Robert A. Wallis, can be found here:
dajoho/itunes-php 适用场景与选型建议
dajoho/itunes-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 40 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 07 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 dajoho/itunes-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dajoho/itunes-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-2.1-only
- 更新时间: 2019-07-11