Hello, i try to convert hex to text
<?php
$ip='192.168.0.5';
$ro='public';
$session = new SNMP(SNMP::VERSION_2C, $ip, $ro);
$ONUsoft = $session->walk("1.3.6.1.4.1.3320.101.10.1.1.5", TRUE);
$hex = hex2bin($ONUsoft);
echo $hex;
result is array array
when i add
var_dump($hex);
result is :
NULL NULL NULL
when i add
var_dump($ONUsoft);
result is :
array(64) { [11]=> string(60) "Hex-STRING: 31 30 2E 30 2E 32 36 42 2E 35 30 31 00 00 00 00 " [12]=> string(60) "Hex-STRING: 31 30 2E 30 2E 31 36 41 20 31 30 32 33 00 00 00 " [13]=> string(60) "Hex-STRING: 31 30 2E 30 2E 31 37 41 20 31 30 31 37 00 00 00 " [14]=> string(60) "Hex-STRING: 31 30 2E 30 2E 31 37 41 20 31 30 31 37 00 00 00 " [15]=> string(60) "Hex-STRING: 31 30 2E 30 2E 31 36 41 20 31 30 34 37 00 00 00 " [16]=>…
I just wanna get only convert 31 30 2E 30 2E 32 36 42 2E 35 30 31 00 00 00 00 to - > 10.0.26B.501