mrjgx Posted December 8, 2007 Share Posted December 8, 2007 Hi guys i;m new here and really need help.. I need to develop a script that will able to monitor other pc's network activity. for example, if there are 1 pc in the LAN that is trying to access google, using port 80, i will be notified. Any idea how to develop that? or a sample code about network monitoring would be greatly appreciated. Thx in advance Quote Link to comment Share on other sites More sharing options...
mrjgx Posted December 8, 2007 Author Share Posted December 8, 2007 ok i found php-snmp analyzer...anyone can help me how to configure snmp into my php.ini? please please ??? Quote Link to comment Share on other sites More sharing options...
hola Posted December 8, 2007 Share Posted December 8, 2007 Installation Guide; http://sourceforge.net/docman/display_doc.php?docid=10223&group_id=14215 Quote Link to comment Share on other sites More sharing options...
mrjgx Posted December 8, 2007 Author Share Posted December 8, 2007 thx for pointing out the installation notes. i already have them when i download the scripts, but i stuck at here: 3) PHP installed with snmp support (use ./configure --with-snmp when compiling PHP) what does it means? i already install snmp services using win xp cd, but my php.ini seems doesnt have any snmp inside it. can somebody help me with configuring snmp into the php.ini? Quote Link to comment Share on other sites More sharing options...
mrjgx Posted December 9, 2007 Author Share Posted December 9, 2007 plz guys..i googled but couldnt find answers... Quote Link to comment Share on other sites More sharing options...
revraz Posted December 9, 2007 Share Posted December 9, 2007 Do you have control over the server or is it a shared webhost? Quote Link to comment Share on other sites More sharing options...
mrjgx Posted December 9, 2007 Author Share Posted December 9, 2007 the server is in my localhost, using netserver, php 4.3.9 and apache webserver. ok i've put the php_snmp.dll and php_sockets.dll in the php.ini files, but the snmp function queries didnt return any result. for example: $name = @ snmpget($ipaddress, "public", "system.sysName.0", 2); echo $name; it will not return anything. is there something i miss? Quote Link to comment Share on other sites More sharing options...
mrjgx Posted December 9, 2007 Author Share Posted December 9, 2007 one more thing, why do i need to put @ in front of snmpget() ? if i omit the @ symbol, this error will be displayed: snmpget(): Invalid object identifier: tcp.tcpCurrEstab.0 in e:\xxx\xx\xx Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted December 9, 2007 Share Posted December 9, 2007 About @ PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by that expression will be ignored. Currently the "@" error-control operator prefix will even disable error reporting for critical errors that will terminate script execution. Among other things, this means that if you use "@" to suppress errors from a certain function and either it isn't available or has been mistyped, the script will die right there with no indication as to why. Quote Link to comment Share on other sites More sharing options...
mrjgx Posted December 9, 2007 Author Share Posted December 9, 2007 ok thx a lot..so the error invalid object identifer problem is? how to solve it.. <?php $a = snmpwalk("127.0.0.1", "public", ""); foreach ($a as $val) { echo "$val\n"; } ?> the above example query by snmpwalk function works fine, but snmpget() didnt return anything but error. much thxxx guys ~ Quote Link to comment 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.