'Failed to open stream: HTTP request failed! ICY 200 OK

I can load the URL "http://192.99.170.8:5756/;1" in the browser (e.g., Firefox, Chrome) and also in VLC (with song title info).

But I can not get info (even not connected) using PHP 8.1.2.

e.g., fopen says "Failed to open stream: HTTP request failed! ICY 200 OK"

<?php
$url = 'http://192.99.170.8:5756/;1';

if (!$fp = fopen($url, 'rb')) { // 'r' also failed
    trigger_error("Unable to open URL ($url)", E_USER_ERROR);
}

$meta = stream_get_meta_data($fp);
fclose($fp);

var_dump($meta);
?>
php


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source