Welcome Guest, Not a member yet? Register   Sign In
Eventually CRACKED IT - Menu driven multiple CodeIgniter applications
#18

[eluser]jstine[/eluser]
Ok, so to implement with your last script try the following:

1. change the top of your menu index.php to this:

Code:
<?php
if($_GET['key'] == "0336asf1462")
{
  error_reporting(-1);//E_ALL | E_STRICT);

2. above the submit button add a hidden input named key with your key value like so

Code:
<input type="hidden" name="key" value="0336asf1462" />
<input type="submit" value="  Start MeCritic Application  " id='button'/>

3. at the bottom of the file I have appended the following to the final php. Basically I close the if statement at the top and set an error message if the key value is incorrect.

Code:
<?php /* container */ } else { echo "You don't have permission to access this file. Please send an email to [email protected] if you feel this is
incorrect.";?>

You now need to use your key to open your protected menu:
http://johns-jokes.com/downloads/codeign...336asf1462

And you can send a protected link to 3rd parties like
http://johns-jokes.com/downloads/codeign...336asf1462

The great thing is you can change the key at anytime to restrict access. Additionally it's easy to add a key value using an || (or) statement. This would allow you to create a separate key for the third party that could easily be removed at anytime while others (a development team) could continue to use the main key uninterrupted.

Hopefully that all makes sense, let me know if it works!


Messages In This Thread
Eventually CRACKED IT - Menu driven multiple CodeIgniter applications - by El Forum - 03-16-2011, 08:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB