Welcome Guest, Not a member yet? Register   Sign In
Secruity Helper Help?
#1

[eluser]Unknown[/eluser]
I am currently developing an application to be used with in the EvE Online IGB(In Game Browser). However I have ran into two sections of coding that I have to repeat over and over for each member. So in an effort of not wasting to much disk space I would like to put them into a helper.
However I am not to sure how to get it to work properly, mostly I need to know how to get it to run the method and get it so that if certain criteria is not met it stops everything after it redirects the user.

Browser Check
Code:
if( $_SERVER['HTTP_USER_AGENT'] != "EVE-minibrowser/3.0" ) {
   redirect('error_igb');
   //stop?
}

Client Trust Check
Code:
if( $_SERVER['HTTP_EVE_TRUSTED'] == 'no' ) {
   header('eve.trustMe:http://' . $_SERVER['HTTP_HOST'] . '/eve/');
   $this->load->view('error_trust');
   //stop?
}

Sample Code
Code:
check_browser();
echo "Using EVE IGB"; //Unreachable if using anything else
check_trust();
echo "Website is trusted"; //Unreachable if not trusted

I have just started to pick up on CodeIgniter and I will probably also need help in making sure that I put everything I need into the helper file. Is there anything special I need to put inside of a helper file?
#2

[eluser]Unknown[/eluser]
Any one able to help me on this? I would like to get my application up an running soon.




Theme © iAndrew 2016 - Forum software by © MyBB