Rad-man, as I do not know what the exact format of the $ip really is...should you be splitting on a "." and using Ltrim if needed?
$oct4 = val(split($ip)[3])
_________________________
Home page: http://www.kixhelp.com/hb/