Wers braucht hier ! Aber geht nicht bei allen FTPs !
Spoiler anzeigen
<?
################################################## ###################
# Subdomain
# Alle Rechte vorbehalten
# Bei Fragen : Skype:rhinno_Rt
################################################## ###################
$underdomaene = $HTTP_HOST;
$underdomaene = eregi_replace("\.".$domain, "", $underdomaene);
$underdomaene = eregi_replace("www\.", "", $underdomaene);
$underdomaene = strtolower($underdomaene);
# If the sub domain is the name of a directory in the document root...
if (is_dir("$DOCUMENT_ROOT/$underdomaene")) {
# The frames version:
if ($use_frames == "yes") {
echo "<html><head><title>$domain/$underdomaene</title>\n\n";
echo "<!---------------------------------------------------------------------\n";
echo " The sub domains at $domain were created using\n";
echo " the PHP script \"Subdomains\"\n";
echo "---------------------------------------------------------------------->\n\n";
echo "</head>\n\n\n\n";
echo "<frameset cols=100%,* frameborder=no border=0 framespacing=0>\n";
echo "<frame src=http://%24domain/%24underdomaene>\n";
echo "<noframes>\n";
echo "<body bgcolor=black link=silver alink=black vlink=gray>\n";
echo "<font face=helvetica color=white><center>\n";
echo "This page uses frames, but it seems that your browser does not support this feature.\n";
echo "To move on, click here:<br><a href=http://%24domain/%24underdomaene>$domain/$underdomaene</a>\n";
echo "</center></font>\n";
echo "</body>\n";
echo "</noframes>\n";
echo "</frameset></html>\n";
}
else {
header("Location: http://%24domain/%24underdomaene");
}
}
else {
if (!$REQUEST_URI $REQUEST_URI == "/") {
include("$DOCUMENT_ROOT/$default_page");
}
else {
header("Location: http://%24domain%24request_uri");
}
}
?>