What I am looking to do is provide an online tool (preferably a php script) that will convert a domain name to decimal and then output the result. I have a script in C# which does this but I have very little knowledge of php so there is no chance of me converting this. Is it even possible? Any help would be great and if someone would find the time to convert it for me I would be sure to compensate them in some way! Here is the C# for the script:
Thanks alot everyone I appreciate it, and w00t first post!Code:private void button1_Click(object sender, EventArgs e) { string textURL = textBox1.Text; // Assign Text entry String IPHostEntry ip = Dns.GetHostEntry(textURL); //DNS lookup of entered Text String ipString = Convert.ToString(ip.AddressList[0]); //Text to String String[] octet = ipString.Split('.'); //Split IP Address into 4 octects double[] octetDouble = new double[4]; //Initialize arrary for octets into Double for (int i = 0; i { octetDouble[i] = Convert.ToDouble(octet[i]); //Populate array with converted octets } double bitstream = octetDouble[3] + octetDouble[2] * 256 + octetDouble[1] * 65536 + octetDouble[0] * 16777216; //Convert the octets to a decimal bitstream string textBitstream = Convert.ToString(bitstream); //Convert Bitstream to text label2.Text = "http://" + textBitstream; //Replace label with http:// + bitstream