Jump to content

[HELP] Show console logs on the web using PHPSDK


Recommended Posts

Hi, I hope someone can help me with this question, I would like to display the latest server logs on a website using PHPSDK but I have a question on how to do it efficiently as it will update in real time. any ideas?

Link to post
On 22/08/2020 at 01:27, AaroN⍩ said:

Hi, I hope someone can help me with this question, I would like to display the latest server logs on a website using PHPSDK but I have a question on how to do it efficiently as it will update in real time. any ideas?

I'm not sure if it's possible to achieve real time with just PHP.
Maybe you can use socket that can be listened with javascript client.

Link to post

You can open a file handle on server.log and read it periodically. Move the pointer to end of file after opening it initially, and read from it at some interval (500ms should feel like realtime).

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...