2) $host = strtok('.'); $domain = strtok('\0'); // $redirects = array( "cp" => array( name => "cp", isstats => true, title => "..::Control Panel for $domain", url => 'http://79.132.212.4:8086', framed => False), "webmail" => array( name => "webmail", isstats => true, title => "..::WebMail for $domain", url => 'http://67.205.96.6:3000', framed => False), "Mail" => array( name => "mail", isstats => true, title => "..::WebMail for $domain", url => 'http://67.205.96.6:3000', framed => False), "MailAdmin" => array( name => "mailadmin", isstats => true, title => "..::Email admin for $domain", url => 'http://67.205.96.6:1000', framed => False), "Stat" => array( name => "Stat", isstats => true, title => "..::Statistics for $domain", url => 'http://79.132.212.4:9999', framed => False), "wmail" => array( name => "wmail", isstats => true, title => "..:: WebMail for $domain", url => 'http://67.205.96.17:9998', framed => False), ); /* ignore below */ foreach ($redirects as $redirect) { strchr($redirect['name'], '.'); } foreach($redirects as $redirect) { if (strcasecmp($redirect['name'], $host) == 0) { if (!$redirect['framed']) { if ( $redirect['isstats'] == true) { $redirect['url'] = str_replace("[domain]", $domain, $redirect['url']); } $url = sprintf("Location: %s", $redirect['url']); header($url); exit(0); } else { if ( $redirect['isstats'] == true) { $redirect['url'] = str_replace("[domain]", $domain, $redirect['url']); } $url = $redirect['url']; $useframes = $redirect['framed']; $title = !empty($redirect['title']) ? $redirect['title'] : $host; } } } if ($useframes && !empty($url)) { ?> <?=$title ?> <?=$title ?>
The URL http://'. $host . '.' . $domain. ' was not found. Try there homepage. http://www.'. $domain.'
'; ?>