شكراً لك أستاذ شادى
أنا وجدت هذه الدالة
شكراً لك أستاذ شادى
أنا وجدت هذه الدالة
كود PHP:
function getHost($Address) {
$Address = str_replace("www.","",$Address);
$parseUrl = parse_url(trim($Address));
return trim($parseUrl[host] ? $parseUrl[host] : array_shift(explode('/', $parseUrl[path], 2)));
}
و هى رائعه مثل ما أريد بالضبط