Advertisement
rhcp011235

Untitled

Jan 30th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. <?
  2.  
  3.  
  4. function nats2ip($ip)
  5. {
  6. // Test for new version of IP (Hex)
  7. if (strpos($ip, '0x') === 0)
  8. {
  9. $ip = hexdec($ip);
  10. }
  11. return long2ip($ip);
  12. }
  13.  
  14. $ip = nats2ip(0xC0A8071B);
  15. echo $ip;
  16.  
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement