My stream people said they could see no reason why this doesnt work

No, this is not the first time. All your questions about the limits are covered in our KB article about it which you yourself linked to in that other topic.

Again, please read the article about the limit. It answers many common questions, including some of yours:

It’s secret. And even if I told you, say, the limit is 512 kB/s with a fault limit of 1000 (arbitrary numbers), how exactly do you suppose that information would help you?

You can find the IO limit usage graph in the control panel.

As I’ve told you many times before: we did not place a router filter or transaction filter. All the limits you’ve experienced are limits that have been there from the start. I don’t know why it worked before and stopped working after, but I guarantee you that it’s not because of a change we made to your site.

OK, then I have no idea what the code you shared is doing.

Just for clarity: where is the ID3 extraction happening? Is that data being extracted somewhere else and then transmitted to your website, or does the metadata extraction process run on our hosting?

I can’t make sense of this statement.

  • No new limits have been installed.
  • Yes, using HTTPS is allowed. If it wasn’t, we would consciously build and offer specific features to get SSL certificates and install them.
  • I don’t know what “fault” you are referring to that we supposedly should fix. Again, we didn’t install any new limits or filters or whatever other malicious act you accuse us of having done to you.

Again, we have absolutely no relation to IONOS. They don’t supply us and (as far as I know) we don’t supply them. There is zero relationship between our services. So of course we don’t mention IONOS: we don’t mention companies we have zero relation with.

If you want to get services from them, you’re free to do so. But they cannot help you with the hosting you get from us and vice versa.

And no, there is no relation between an “IO limit” and “IONOS”. IO is short for “input/output”, which is a common term in the context of computers, as evidenced by the Wikipedia article about it: Input/output - Wikipedia

You’re live streaming music. I thought “internet radio station” was a decent description of what you did. If you would prefer I use another term, please let me know.

7 Likes

I looked at your last post with the code,
but now that you mentioned it, I went to see your edited first post on this topic

so here is the result

I assume that you have some parts defined somewhere in another file or ?
It’s hard to give an answer at all when we don’t have insight into all the files and codes you have.

That’s why it’s best to have an IDE and check all the code
maybe even install a 30-day phpStorm trial
and then you correct all the errors you have.


image


search on Google :slight_smile:

5 Likes

Yes @Oxy i have two other class parts on the server that this class reads too

<?php
namespace SHOUTcast;

require "http_streaming.php";
require "http_request_message.php";
require "http_reponse_message.php";


Ide is RedHat ? Also the server was not updated as i could not get update on it as ftp was disabled

No, keep trying… :slight_smile:

3 Likes

I am scared too , since your Infinity new control panel put limit on unlimited website and they will not inform me a new threshold value or a graph that i can check to see this is not occurring. Therefore i cannot determine this is happening before my website services are blocked this is wholly unfair. It is not sufficient to block access my site for ten (10 )or more hours if you cannot provide me with something i can physically check to see if i am near this new threshold.

Hugs D x

Did IF really claim to be so? I highly doubt it.
Free is free. It cannot be unlimited.

This is to prevent people from gaming the system

As for IO limits, take note

5 Likes

@KangJL its is not on my control panel showing a graph of usage I thought i was being clear sorry I have written to IONOS who I originally signed up with. as do not think this is fair ! I dont believe i can run anything on the site without breaking this secret limit currently i believe i was writing to disk ever 3mins which does not seem excessive . Now I am left to try read this from stream but can locate what "oxy is referring too to debug the code

Hugs D

Yes, there is. If you go to the Account Statistics page, you’ll see graphs for all metrics, including IO usage.

This graph has been there from the start.

Yes, the IO usage is not listed in the sidebar. The sidebar doesn’t show all metrics. Actually, the sidebar doesn’t show graphs at all, all the graphs have always been only on the Account Statistics page.

Again, IONOS cannot help you with this. Your website is hosted with us, not with them. Just because you may have or have had services with them before doesn’t mean that they can support a website that they don’t host.

It’s not a secret limit. Just because you weren’t aware of it doesn’t mean it’s secret. There is an article in our knowledge base, accessible to everyone, that explains exactly what this limit means, and every account has a graph displaying their usage over time in the control panel. We display this limit just as publicly as we do most other limits.

5 Likes

Well am trying to find it sorry for my lack of abilities . I have downloaded Visual Studio as not getting any direction well I dont understand how signing up with IONIS got me with you . Perhaps they can explain as its a bit confusing. I still dont think i can run anything on my site a single day of testing sent it over this limit what ever it it is. Previous to this this same code had been running for a whole week upon week without reaching this limit which changed last week. Any way I am trying to make the best of it here as there is always a way forward if you look for it

@Admin Admin I dont see any point of having an argument. I could provide email from Fri, Dec 16, 4:47 AM by Lee Johnston of Wildcard Net:, but that wont solve anything as we moved past it at that time . I am trying to focus on a better way forward that works with my stream no recording any data other than sql certainly not producing i/o which is now restricted. I was informed to get an IDE I hope Visual Studio is what was meant?

@Oxy Also I loaded the files into Studio and it said it had no issues or errors but get this

Parse error: syntax error, unexpected ‘->’ (T_OBJECT_OPERATOR) in /home/vol1_2/epizy.com/epiz_33087480/htdocs/stream/lib/stream.php on line 183

it seems to be stopping here
[183] if(substr($tag,0,3) == “id3” ) {
[184] if(substr($tag,4,6) == “v22”) {
[185] )
[186] } else if(substr($tag,4,6) == “v23”){
[187]
[188] }
[189]
[190] }

Sigh gives up going to HTTPs cant understand this code it only seems to step through 8192 chunk not even reading headers. This said if its dumping this all why does it not play ? Is it missing the headers on each 8192 bytes?

$url = "http://".$server.":".$port."/".$mount;


class MetadataBlock {
    private $expected_length, $content;
    public $ID3 =  array(
    "ID3" => array(BinaryFileReader::FIXED, 3),
    "Version" => array(BinaryFileReader::FIXED, 2),
    "Flag" => array(BinaryFileReader::FIXED, 1),
    "SizeTag" => array(BinaryFileReader::FIXED, 4, BinaryFileReader::INT)
    );
    public $ARTMAP =  array(
    "TextEncoding" => array(BinaryFileReader::FIXED, 1),
    "MimeType" => array(BinaryFileReader::NULL_TERMINATED),
    "FileName" => array(BinaryFileReader::NULL_TERMINATED),
    "ContentDesc" => array(BinaryFileReader::NULL_TERMINATED),
    "BinaryData" => array(BinaryFileReader::EOF_TERMINATED)
    );
    public $ALLTAGS =  array(
    "FrameID" => array(BinaryFileReader::FIXED, 4),
    "Size" => array(BinaryFileReader::FIXED, 4, BinaryFileReader::INT),
    "Flag" => array(BinaryFileReader::FIXED, 2),
    "Body" => array(BinaryFileReader::SIZE_OF, "Size"),
    );

    private $id3v23 = array("TIT2","TALB","TPE1","TRCK","TDRC","TLEN","USLT");
    private $id3v22 = array("TT2","TAL","TP1","TRK","TYE","TLE","ULT");
    
   /**
     * Creates a new empty MetadataBlock with the given $expected_length.
     * The actual content can be added using the write() method.
     */
    public function __construct($expected_length) {
      $this->content = '';
      $this->expected_length = $expected_length;
    }

    public function expected_length() {
      return $this->expected_length;
    }

    public function write($buffer) {
      $this->content .= $buffer;
    }

    public function content() {
      return $this->content;
    }

    public function length() {
      return strlen($this->content);
    }

    /**
     * Determines if the metadata block is complete. A metadata block is completed
     * when its content has at least $expected_length bytes of data.
     * https://learn.microsoft.com/en-us/windows/win32/wmformat/id3-tag-support
     */
    public function is_complete() {
      return $this->remaining_length() == 0;
    }

    public function remaining_length() {
      return $this->expected_length - $this->length();
    }
    public function stream_title() {
      if (!$this->is_complete())
        throw new \Exception("The Title is not complete yet");
      $start = strlen("TIT1"); // title
      $end = strpos($this->content, "TIT1", $start);
      return substr($this->content, $start, $end-$start);
    }public function stream_author() {
      if (!$this->is_complete())
        throw new \Exception("The Authur is not complete yet");
      $start = strlen("TPE2"); //Author
      $end = strpos($this->content, "TPE2", $start);
      return substr($this->content, $start, $end-$start);
    }
    public function stream_album() {
      if (!$this->is_complete())
        throw new \Exception("The Album is not complete yet");
      $start = strlen("TALB");      // The structure of the TALB (Album) text frame
      $end = strpos($this->content, "TALB", $start);
      return substr($this->content, $start, $end-$start);
    }
    public function stream_genre() {
      if (!$this->is_complete())
        throw new \Exception("The Genre is not complete yet");
      $start = strlen("TCON");      // Genre 
      $end = strpos($this->content, "TCON", $start);
      return substr($this->content, $start, $end-$start);
    }
    public function stream_comment() {
      if (!$this->is_complete())
        throw new \Exception("The comment is not complete yet");
      $start = strlen("TCOM");      // Comment
      $end = strpos($this->content, "TCOM", $start);
      return substr($this->content, $start, $end-$start);
    }
    public function stream_year() {
      if (!$this->is_complete())
        throw new \Exception("The comment is not complete yet");
      $start = strlen("TYER");       // Year
      $end = strpos($this->content, "TYER", $start);
      return substr($this->content, $start, $end-$start);
    }  
    public function stream_duration() {
      if (!$this->is_complete())
        throw new \Exception("The duration is not complete yet");
      $start = strlen("TLEN");       // Duration
      $end = strpos($this->content, "TLEN", $start);
      return substr($this->content, $start, $end-$start);
    } 
    public function stream_bpm() {
      if (!$this->is_complete())
        throw new \Exception("The bpm is not complete yet");
      $start = strlen("TBPM");      // Beats per Minute.
      $end = strpos($this->content, "TBPM", $start);
      return substr($this->content, $start, $end-$start);
    }
    public function stream_listeners() {
      if (!$this->is_complete())
        throw new \Exception("The listeners is not complete yet");
      $start = strlen("LISTENERS=");
      $end = strpos($this->content, ";", $start);
      return substr($this->content, $start, $end-$start);
    } 
    public function stream_song_cover() {
         $start = strlen("APIC");
         $end = strpos($this->content, "APIC", $start);
         return substr($this->content, $start, $end-$start);
    }

    public function stream_lyrics() {

         $start = strlen("USLT");
         $end = strpos($this->content, ";", $start);
         return substr($this->content, $start, $end-$start);
    }
}

// Begin SHOUTcast Principle control
class stream {
    private $metadata, $next_metadata_position, $icy_metaint, $mp3, $stream_bytes_count = 0;
    private $length,$duration,$tag;
    private $expected_length, $content;
    private $options, $default_options = array(
      'path'               => '.',
      'split_tracks'       => false,
      'max_track_duration' => 3600, #sec (1 h)
      'max_track_length'   => 102400000 #bytes (100 mb)
    );
    public $title;
    public function __construct($options=array()) {
      $this->options = array_merge($this->default_options, $options);
    }

    public function start($url) {
      $http_streaming = new HttpStreaming($url);
      
      $http_streaming->open();
      $response_message = $http_streaming->response_message();
      var_dump($response_message);
      $this->icy_metaint = $response_message->icy_metaint();
     
      $this->next_metadata_position = $this->icy_metaint; //8192 value lenghth of frames
      
           
      while ($buffer = $http_streaming->read_stream()) {
        $this->length += strlen($buffer);
        if (!$this->process_received_buffer($buffer) || $this->are_limits_reached()) break;
      }
    }

    private function are_limits_reached(){
        //return false;
        return  $this->length >= $this->options['max_track_duration'];
    }
    private function process_received_buffer($buffer) {
      $buffer_len = strlen($buffer);
      $this->stream_bytes_count += $buffer_len;
      var_dump( $buffer);
      return TRUE;

    }
}

?>

Also what does this represent as i cant make any head or tail of it the axis make no sense

Out of all the IDEs, you chose the biggest one (unless it is VS Code)
listen, it’s a tool to help you
and you must know that it is not so smart that it fully understands your program and that it automatically knows what is defined in another file, etc.
so don’t pay attention to everything it tells you,
use common sense and of course, you will gain some experience over the years
so you will better understand if there is a problem or not.

If nothing else, you won’t have problems with unclosed brackets or quotes and other things you often did in your php/js code.

6 Likes

Well the graph looks wrong i have not used the site since suspension until today it shows reading for tomorrow which has not happened yet

Well i am not using it at present as scared too as it will just suspend me again and it makes no sense the graph as it doesn’t even show accurate data after suspensions. I cant get this thing to work at all restreaming or even reading the id3 codes i think the code i had runs through 8192 bytes but it must strip something out as even if i tell website it can use data as a stream it doesn’t i presume you read first stuff upto 8192 which is my sysytem took down

Hi, what to say.
This is my secondary account.

I’m sorry for doing mistake and get banned.
So, i can’t see anything to the forum, from my previous account.
So what i missed You can tell me, right?

I have a question, why your stream don’t have voice. I think we had a great job.

i was found it working.
You better echo or vardump on write_buffer function like this

public function write_buffer($buffer, $start=0, $len=null) {
      $buffer = $len ? substr($buffer, $start, $len) : substr($buffer, $start);
      //fwrite($this->handle, $buffer);
      //$this->length += strlen($buffer);
      
      echo $buffer;
    }

it won’t write to the file.
So when you when You put your code to for example getStream.php You will get the mp3 stream data clean without metadata. don’t write/echo header to make it stream page. If write header it will download it instead of streaming it.

Thanks but am getting this at present on file manager

Have You clear cache