How to Check an IP by Domain Name With PHP

104 31
    • 1). Launch the plain text editor application on your system such as NotePad on the PC; Jedit, Gedit on Linux systems; and Komodo Edit, Smultron, BBEdit or TextMate on Mac OS X.

    • 2). Type the following PHP code in the text editor:

      <?php

      $domain="www.churchfolknews.com";

      $ipaddress= gethostbyname($domain);

      echo ""."The IP address for ".$domain." is: ".$ipaddress;

      ?>

    • 3). Click on the File menu and select "Save." Name the file "getipaddress.php."

    • 4). Click on the File menu and select "Quit" or "Exit" to close the text editor.

    • 5). Launch the FTP application and log in to the web server.

    • 6). Upload the file "getipaddress.php" to the root directory of the web server.

    • 7). Click on the Disconnect button of the FTP application.

    • 8). Launch a web browser and enter the appropriate URL to access the PHP file.

    • 9). Press the enter key to load the URL and run the PHP file.

Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.