title: Build a PHP api that doesn't require constant requests
body: <p>So I am working to build an IP in PHP. I'm using Fetch method in Javascript to get the response. When something changes on server, it need to send a response to JS. To do this I was using <code>setInterval()</code> and repeat each second. These are too much requests. Is there any better way to do it?</p>