Domain Name IP Address Lookup
Return the IP address from a domain name.
Copy this code and paste it in your HTML
cls
echo.Domain Name IP Address Lookup
echo.-----------------------------
:userchoice
set /p choice=Enter the website address:
set choice=
%choice:http://=% for /f "tokens=1,2 delims=/"
%%a in ("
%choice%"
) do set domainhost=
%%a & set domainpath=
%%b for /f "skip=1 tokens=2 delims=[]"
%%*
in ('ping.exe -n 1
%domainhost%'
) do (set "IP=
%%*"
& goto:check
) :check
:displayip
echo.The web server IP is:
%IP% :displayerror
:end
Report this snippet
Comments
Subscribe to comments