To get Valid Domain, Valid IP & Valid Directory of your domain use the below code in any php file
<?php
echo "IP Address: - ";
$curl = curl_init('https://api.licenses.cc/getip');
$result = curl_exec($curl);
echo $result;
echo "
";
echo "Domain Path: - ";
echo getcwd();
echo "
";
echo "Domain Name: - ";
echo $_SERVER['HTTP_HOST'];
?>