Use http:// or https:// in URLs based on URL of current page
This commit is contained in:
		
							
								
								
									
										11
									
								
								common.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								common.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| <?php | ||||
| function get_protocol() { | ||||
| 	$protocol = "http"; | ||||
| 	if ( (!empty($_SERVER['HTTPS'] && $_SERVER['HTTPS'] !== 'off') || | ||||
| 		$_SERVER['SERVER_PORT'] == 443) ) | ||||
| 		$protocol = "https"; | ||||
| 	return $protocol."://"; | ||||
| } | ||||
| $protocol = get_protocol(); | ||||
| $base_url = $protocol.$_SERVER['HTTP_HOST']; | ||||
| ?> | ||||
		Reference in New Issue
	
	Block a user