Created
July 15, 2011 15:55
-
-
Save littlemerman/1084953 to your computer and use it in GitHub Desktop.
Converts an IP Number to an IP Address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var c= function(p){n = p;pA = [];for(i=3;i>=0;i--){pq=Math.floor(n/Math.pow(256,i));pA.push(pq);n=n-pq * Math.pow(256, i);}return pA.join('.');}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment