<?php 
$domain="https://".$_SERVER['SERVER_NAME']."/";
$domain=str_replace("www.", "", $domain);
echo $domain;
 ?>