| 
									
										
										
										
											2014-01-23 23:08:42 -05:00
										 |  |  | <?php | 
					
						
							|  |  |  | function get_protocol() { | 
					
						
							|  |  |  | 	$protocol = "http"; | 
					
						
							| 
									
										
										
										
											2014-01-23 23:32:15 -05:00
										 |  |  | 	if ( (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS'] | 
					
						
							|  |  |  | 			&& $_SERVER['HTTPS'] !== 'off') || | 
					
						
							|  |  |  | 			$_SERVER['SERVER_PORT'] == 443) ) | 
					
						
							| 
									
										
										
										
											2014-01-23 23:08:42 -05:00
										 |  |  | 		$protocol = "https"; | 
					
						
							|  |  |  | 	return $protocol."://"; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | $protocol = get_protocol(); | 
					
						
							|  |  |  | $base_url = $protocol.$_SERVER['HTTP_HOST']; | 
					
						
							|  |  |  | ?>
 |