Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $_domain=NULL;
- $_port=NULL;
- function formatDomain($sub='www', $scheme='http')
- {
- global $_domain, $_port;
- if (!$_port)
- {
- $_port = ($_SERVER['SERVER_PORT'] == '80')?'':':'.$_SERVER['SERVER_PORT'];
- }
- if (!$_domain)
- {
- $_domain = isset($_SERVER['SERVER_NAME'])?$_SERVER['SERVER_NAME']:'over';
- $entry = '#^.*?([\w\-\_]+\.[\w\-\_]+)$#';
- if (preg_match($entry, $_domain, $match))
- $_domain = $match[1];
- }
- return ($scheme?$scheme.'://':'').$sub.'.'.$_domain.$_port;
- }
- return array(
- 'GAME_SLOT' => formatDomain('igrovye-avtomaty'),
- 'GAME_GAMBLE' => formatDomain('azartnye-igry'),
- 'REVIEW_POKER' => formatDomain('poker-rooms'),
- 'REVIEW_CASINO' => formatDomain('casino-online'),
- 'LIVESPORT' => formatDomain('livesport'),
- 'MAIN' => formatDomain('www'),
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement