Get Attributes from URI


#1

how to get the Attributes form the URI requested by client side ,
URI :
http://localhost:8080/serverEndModule1/v1/varify?id=OQ==&code=1e212ffc375e52a9c6e7debe8adcc179
I want to get two attributes into server end how can get two attributes from the URI
I try the following code ( get Route)

$app->get(’/varify/:id/:code’, function ($id,$code) use ($app) {
_ //verifyRequiredParams(array(‘id’, ‘code’));_
// $id = $app->request->post(‘id’);
// $code = $app->request->post(‘code’);
_ _
_ $db = new DbOperation();_
_ $response = array();_
_ $res= $db->userVarify($id, $code);_
_ if($res==0)_
_ {_
_ $response[“error”] = false;_
_ $response[“message”] = " Your Account is Now Activated ";_
_ echoResponse(201, $response);_
_ }else if ($res==1) {_
_ _
_ $response[“error”] = true;_
_ $response[“message”] = " Your Account is Now Activated ";_
_ echoResponse(201, $response);_
_ _
_ } else if ($res==2) {_
_ $response[“error”] = true;_
_ $response[“message”] = " No Account Found ";_
_ echoResponse(201, $response);_
_ _
_ } Please help_


#2

Are you using Slim version 2?


#3

Thank for replay , Yes I’m using slim version 2