Hallo nochmal,
PS: Wo genau blickst Du denn nicht durch?
die ganze funktion verwirrt mich. nehemn wir mal
Beispiel 3. Getting the domain name out of a URL
// get host name from URL
preg_match("/^(http://)?([^/]+)/i",
"http://www.php.net/index.html", $matches);
$host = $matches[2];
// get last two segments of host name
preg_match("/[^./]+.[^./]+$/",$host,$matches);
echo "domain name is: ".$matches[0]."\n";
also
preg_match("/^(http://)?([^/]+)/i","http://www.php.net/index.html", $matches);
$host = $matches[2];
preg_match("/[^./]+.[^./]+$/",$host,$matches);
echo "domain name is: ".$matches[0]."\n";echo "domain name is: ".$matches[0]."\n";
das wovor ich "angst" habe sind die vielen //////// und /[^./]+.[^./]+$/ 1mal was falsch gestzt und schon ein parse error.
MfG
Michael W.