// Mickies secure non secure hack if getenv($_SERVER['SERVER_PORT'] = 80) { $secure = 'http'; } elseif getenv($_SERVER['SERVER_PORT'] = 443) { $secure = 'https'; }