Salve
ho questo script che mi estrapola i metatag da un flusso streaming audio, però ogni tanto ho questo errore:
codice:
Warning: fopen(http://indirizzoflusso): failed to open stream: HTTP request failed! HTTP/1.0 429 Too Many Requests in D:\inetpub\webs\sito\meta.php on line 23
la linea 23 è: $stream = fopen($steam_url, 'r');
ecco lo script:
codice:
<?php
    $stream = getMp3StreamTitle("http://indirizzoflusso");
  
    print($stream);

    function getMp3StreamTitle($steam_url)
    {
        $result = false;
        $icy_metaint = -1;
        $needle = 'StreamTitle=';
        $ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36';

        $opts = array(
            'http' => array(
                'method' => 'GET',
                'header' => 'Icy-MetaData: 1',
                'user_agent' => $ua
            )
        );

        $default = stream_context_set_default($opts);

        $stream = fopen($steam_url, 'r');

        if($stream && ($meta_data = stream_get_meta_data($stream)) && isset($meta_data['wrapper_data'])){
            foreach ($meta_data['wrapper_data'] as $header){
                if (strpos(strtolower($header), 'icy-metaint') !== false){
                    $tmp = explode(":", $header);
                    $icy_metaint = trim($tmp[1]);
                    break;
                }
            }
        }

        if($icy_metaint != -1)
        {
            $buffer = stream_get_contents($stream, 300, $icy_metaint);

            if(strpos($buffer, $needle) !== false)
            {
                $title = explode($needle, $buffer);
                $title = trim($title[1]);
                $result = substr($title, 1, strpos($title, ';') - 2);
            }
        }

        if($stream)
            fclose($stream);

        return $result;
    }
?>
Come posso risolvere questo errore? grazie