This php function helps you to converts an IP address to it's relative hex value.
Code Example:
<?php $ip = "192.168.1.14"; $ip_split = explode('.', $ip); $HEXIP = sprintf('%02x%02x%02x%02x', $ip_split[0], $ip_split[1], $ip_split[2], $ip_split[3]); ?>
Output:
c0a8010e