mrjgx Posted January 2, 2008 Share Posted January 2, 2008 Well i queried the hrSWRunName (SNMP function) to get me the running softwares' name of my client in LAN network. Well, i have one problem here. I code my program to list all the running software in real time, and echo the array in my webpage, but whenever i refresh the page, the newly open software or newly close software are not displayed, eventhough i refresh the page many times. The only way to detect recent software running or closed is by closing the internet browser, and open the page again using new browser. How do i solve this problem? so that i just refresh the page, and it will automatically displays the latest software running/closed? Thx in advance Quote Link to comment https://forums.phpfreaks.com/topic/84127-help-using-metarefresh/ Share on other sites More sharing options...
aschk Posted January 2, 2008 Share Posted January 2, 2008 Your page is being cached by your browser. You need to send headers to the browser to expire the page. I think the ones of interest are <?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past ?> note: the above information was kindly supplied by the php.net website. For further header information see http://uk2.php.net/header Quote Link to comment https://forums.phpfreaks.com/topic/84127-help-using-metarefresh/#findComment-428261 Share on other sites More sharing options...
mrjgx Posted January 3, 2008 Author Share Posted January 3, 2008 thx for the reply. but that doesnt solve the problems. anybody can help? Quote Link to comment https://forums.phpfreaks.com/topic/84127-help-using-metarefresh/#findComment-428859 Share on other sites More sharing options...
mrjgx Posted January 3, 2008 Author Share Posted January 3, 2008 Ok, this is just the bit of my code fragment that touch about retrieving running software's name: <?php $test = @ snmpwalk("192.100.100.7", "public", ".1.3.6.1.2.1.25.4.2.1.2", 5); foreach ($test as $val) { echo "$val "; } ?> <p><?php echo '<META HTTP-EQUIV="refresh" CONTENT="5; URL=monitor.php">'; ?></p> the problem is it seems that whenever i refresh the page, the value of the retrieved software names doesnt change, eventhough there are changes made (e,g: closing a software) i have to close the browser, then re-run the script, only will the changes occur. pls help, and thx in advance. Quote Link to comment https://forums.phpfreaks.com/topic/84127-help-using-metarefresh/#findComment-429274 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.