| 
									
										
										
										
											2020-10-02 17:02:20 +08:00
										 |  |  | <?php | 
					
						
							|  |  |  |     // https://stackoverflow.com/questions/33999475/prevent-direct-url-access-to-php-file
 | 
					
						
							|  |  |  |     if (!isset($_SERVER['HTTP_REFERER']) ) { | 
					
						
							|  |  |  |         /* choose the appropriate page to redirect users */ | 
					
						
							| 
									
										
										
										
											2022-12-01 21:41:27 +08:00
										 |  |  |         die( header( 'location: logout.php' ) ); | 
					
						
							| 
									
										
										
										
											2020-10-02 17:02:20 +08:00
										 |  |  |     } | 
					
						
							|  |  |  | ?>
 |