I've been looking for hours for a solution to this problem.
I have a panel which takes everything in a given directory and displays it. I would like it to do this every 10 seconds because right now you have to refresh your entire page.
So when I do this
GetLogs(); sleep(5); GetLogs();
Instead of getting the directories, displaying them, waiting 5 seconds, and then displaying them again, it simply does GetLogs();, waits for 5 seconds then does it again, and then load my page. I have seen people use AJAX but it's a bit out of my league for this problem I think. I've read that changing my apache settings or php settings would resolve this problem but I have no idea how. I also looked into session_write_close and session_start but these do nothing, These functions are being called from within this php file. please help me!
I was stupid and for some reason thought I could use a server side language to sleep client-side, my bad. Could someone spoonfeed me an ajax call please?