PHPackages                             gonetone/hinet-hichannel-taiwan-radio - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gonetone/hinet-hichannel-taiwan-radio

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

gonetone/hinet-hichannel-taiwan-radio
=====================================

取得 HiNet hichannel 台灣電台的 m3u8 串流網址、節目表和其他資訊！

v2.2.3(4y ago)620MITPHPPHP &gt;=7.2

Since Nov 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/GoneToneStudio/php-hinet-hichannel-taiwan-radio)[ Packagist](https://packagist.org/packages/gonetone/hinet-hichannel-taiwan-radio)[ Docs](https://github.com/GoneToneStudio/php-hinet-hichannel-taiwan-radio)[ Fund](https://donate.reh.tw/)[ Fund](https://paypal.me/GoneTone)[ RSS](/packages/gonetone-hinet-hichannel-taiwan-radio/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (2)Versions (7)Used By (0)

HiNet hichannel 台灣電台 (PHP 套件)
=============================

[](#hinet-hichannel-台灣電台-php-套件)

取得 HiNet hichannel 台灣電台的 m3u8 串流網址、節目表和其他資訊！

Node.js 版本：

注意
--

[](#注意)

- HiNet hichannel m3u8 串流網址會阻擋國外 IP 訪問 (HTTP 403 Forbidden)。
- 播放端 IP 和用來取得 m3u8 串流網址的伺服器 IP 要是相同的，不然無法播放 (HTTP 403 Forbidden)，可以嘗試在伺服端處理好在串流給播放端，就二次串流。

問題
--

[](#問題)

如果發現任何 BUG，請在此回報：

要求
--

[](#要求)

- PHP 7.2 或更高版本

安裝
--

[](#安裝)

使用 [Composer](https://getcomposer.org/) 來安裝 HiNet hichannel 台灣電台 (PHP 套件)。

```
composer require gonetone/hinet-hichannel-taiwan-radio

```

取得 Hichannel 頻道名稱方法
-------------------

[](#取得-hichannel-頻道名稱方法)

1. 前往 [HiNet hichannel 網站](https://hichannel.hinet.net/)
2. 點選您想要聽的電台並確認可以播放
3. 複製完整頻道名稱，使用時名稱要完全一樣 (如果不能直接複製可以利用 F12，或者就乖乖用打的XDD)

使用方法
----

[](#使用方法)

### 使用 HiNetHichannel 物件

[](#使用-hinethichannel-物件)

```
$hichannel = new HiNetHichannel("Hichannel 完整頻道名稱 (string)");
```

### 取得 m3u8 串流網址

[](#取得-m3u8-串流網址)

```
try {
    $hichannel->loadApi(); //加載 HiNet hichannel API
    echo $hichannel->playUrl(); //HiNet hichannel m3u8 串流網址 (string)
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### 取得頻道名稱

[](#取得頻道名稱)

```
try {
    $hichannel->loadApi(); //加載 HiNet hichannel API
    echo $hichannel->title(); //HiNet hichannel 頻道名稱 (string)
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### 取得頻道 ID

[](#取得頻道-id)

```
try {
    $hichannel->loadApi(); //加載 HiNet hichannel API
    echo $hichannel->id(); //HiNet hichannel 頻道 ID (string)
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### 取得頻道描述

[](#取得頻道描述)

```
try {
    $hichannel->loadApi(); //加載 HiNet hichannel API
    echo $hichannel->desc(); //HiNet hichannel 頻道描述 (string)
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### 取得頻道區域

[](#取得頻道區域)

```
try {
    $hichannel->loadApi(); //加載 HiNet hichannel API
    echo $hichannel->area(); //HiNet hichannel 頻道區域 (string)
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### 取得頻道類型

[](#取得頻道類型)

```
try {
    $hichannel->loadApi(); //加載 HiNet hichannel API
    echo $hichannel->type(); //HiNet hichannel 頻道類型 (string)
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### 取得頻道圖片網址

[](#取得頻道圖片網址)

```
try {
    $hichannel->loadApi(); //加載 HiNet hichannel API
    echo $hichannel->imageUrl(); //HiNet hichannel 頻道圖片網址 (string)
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### 取得頻道節目表

[](#取得頻道節目表)

```
try {
    $hichannel->loadApi(); //加載 HiNet hichannel API
    print_r($hichannel->programList()); //HiNet hichannel 頻道節目表 (array)
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### 取得頻道目前節目名稱

[](#取得頻道目前節目名稱)

```
try {
    $hichannel->loadApi(); //加載 HiNet hichannel API
    echo $hichannel->nowProgramName(); //HiNet hichannel 頻道目前節目名稱 (string)
} catch (Exception $e) {
    echo $e->getMessage();
}
```

範例
--

[](#範例)

### 完整範例

[](#完整範例)

```
use GoneTone\HiNetHichannel;

require_once(dirname(__FILE__) . "/vendor/autoload.php");

$hichannel = new HiNetHichannel("KISS RADIO 大眾廣播電台"); //請輸入完整頻道名稱

try {
    /* 加載 HiNet hichannel API */
    $hichannel->loadApi();

    /* 取得 HiNet hichannel m3u8 串流網址 */
    echo "m3u8 串流網址：" . $hichannel->playUrl() . "\n";

    /* 取得 HiNet hichannel 頻道名稱 */
    echo "頻道名稱：" . $hichannel->title() . "\n";

    /* 取得 HiNet hichannel 頻道 ID */
    echo "頻道 ID：" . $hichannel->id() . "\n";

    /* 取得 HiNet hichannel 頻道描述 */
    echo "頻道描述：" . $hichannel->desc() . "\n";

    /* 取得 HiNet hichannel 頻道區域 */
    echo "頻道區域：" . $hichannel->area() . "\n";

    /* 取得 HiNet hichannel 頻道類型 */
    echo "頻道類型：" . $hichannel->type() . "\n";

    /* 取得 HiNet hichannel 頻道圖片網址 */
    echo "頻道圖片網址：" . $hichannel->imageUrl() . "\n";

    /* 取得 HiNet hichannel 頻道目前節目名稱 */
    echo "頻道目前節目名稱：" . $hichannel->nowProgramName() . "\n";

    /* 取得 HiNet hichannel 頻道節目表 */
    echo "頻道節目表：\n";
    print_r($hichannel->programList());
} catch (Exception $e) {
    echo $e->getMessage();
}
```

### 網頁播放電台範例

[](#網頁播放電台範例)

請看 [examples/webpage/play\_radio.php](examples/webpage/play_radio.php) 。

代理 (Proxy)
----------

[](#代理-proxy)

如果運行此程式的伺服器不在台灣，請設定台灣的 Proxy 伺服器，否則取得的串流網址會驗證失敗 (HTTP 403 Forbidden)，但如果播放端 IP 和用來取得 m3u8 串流網址的伺服器 IP 不同一樣會被阻擋就是了，可以嘗試在伺服端處理好在串流給播放端，就二次串流。

```
use GoneTone\HiNetHichannel;
use GoneTone\Proxy;

require_once(dirname(__FILE__) . "/vendor/autoload.php");

/* 連線到 Proxy 伺服器 */
$proxy = new Proxy("主機名", 3128, "http");
//$proxy->login("帳號", "密碼"); //如果 Proxy 伺服器需要驗證，請調用這登入

$hichannel = new HiNetHichannel("電台名稱", $proxy);
```

補充
--

[](#補充)

如果需要取得新資料，必須再次調用 `$hichannel->loadApi()` 才會取得最新資料。

```
try {
    /* 加載 HiNet hichannel API */
    $hichannel->loadApi();

    /* 取得最新 HiNet hichannel m3u8 串流網址 */
    echo "m3u8 串流網址：" . $hichannel->playUrl() . "\n";

    /* 取得最新 HiNet hichannel 頻道目前節目名稱 */
    echo "頻道目前節目名稱：" . $hichannel->nowProgramName() . "\n";
} catch (Exception $e) {
    echo $e->getMessage();
}
```

License
-------

[](#license)

[MIT](LICENSE)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~39 days

Recently: every ~45 days

Total

6

Last Release

1798d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a1539981953385cd9b6903099435824b258331a86522f7f959115599f0c7d8c?d=identicon)[GoneTone](/maintainers/GoneTone)

---

Top Contributors

[![GoneTone](https://avatars.githubusercontent.com/u/10025956?v=4)](https://github.com/GoneTone "GoneTone (19 commits)")[![edwinyoo44](https://avatars.githubusercontent.com/u/7691822?v=4)](https://github.com/edwinyoo44 "edwinyoo44 (1 commits)")

---

Tags

composer-packagehichannelhinet-hichannel-m3u8m3u8phpphp-libraryphp7radiostreamnodeTaiwanlivem3u8radiohinethichannel

### Embed Badge

![Health badge](/badges/gonetone-hinet-hichannel-taiwan-radio/health.svg)

```
[![Health](https://phpackages.com/badges/gonetone-hinet-hichannel-taiwan-radio/health.svg)](https://phpackages.com/packages/gonetone-hinet-hichannel-taiwan-radio)
```

###  Alternatives

[react/stream

Event-driven readable and writable streams for non-blocking I/O in ReactPHP

688126.8M194](/packages/react-stream)[wenzhixin/bootstrap-table

An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)

11.8k283.4k1](/packages/wenzhixin-bootstrap-table)[trafficcophp/bytebuffer

Node.js inspired byte stream buffer for PHP.

33437.2k17](/packages/trafficcophp-bytebuffer)[fab2s/nodalflow

A PHP Nodal WorkFlow

16362.4k1](/packages/fab2s-nodalflow)[zoon/rialto

Manage Node resources from PHP

12199.4k3](/packages/zoon-rialto)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
