note 57968 added to ref.snmp

From: Date: Thu, 20 Oct 2005 07:57:15 +0000
Subject: note 57968 added to ref.snmp
Groups: php.notes 
Request: Send a blank email to php-notes+get-97290@lists.php.net to get a copy of this message
For some devices one needs a string index, i.e. activeSessions.activeSession-inputOctets."ABC" On commandline this is possible with the "-Ir" flag. PHP does not seem to like it regardless of the quoting. Converting the string index to a numeric OID is quite simple though, it becomes: activeSessions.activeSession-inputOctets.3.41.42.43 function getNumericStringIndex($string_idx) { $string_idx = substr($string_idx, 1, strlen($string_idx)-2); $ret = strlen($string_idx); for ($i=0; $i<strlen($string_idx); $i++) $ret .= '.'.ord($string_idx[$i]); return $ret; } ---- Manual Page -- http://www.php.net/manual/en/ref.snmp.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57968 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57968&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57968&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57968&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57968&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57968&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57968&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57968&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57968&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#97290) next »