hi I am trying to use GET to send some json data.
I tried using this way 
This is the url = localhost/index.php/getRequest?name=BestRate&secret=masnadsapi
public function getRequest(){
        $verb = $_SERVER['REQUEST_METHOD'];
        if($verb == 'GET'){
            if(isset($_GET['name']) && isset($GET['secret']) ){
               $name = $_GET['name'];
               $secret = $GET['secret'];
               if($name == 'BestRate' && $secret == 'masnadsapi'){
                   $foo = array(
                       'Todays Best Rate' => '5.6%'
                   );
                   $this->output->set_content_type('application/json');
                    $this->output->set_output(json_encode($foo));
               }else{
                   return;
               }
            }else{
                echo 'Masnad says  : no parameter giving' ;
            }
        }
    }
The error is Message: Undefined variable: GET For the secret part.
 
     
    