how to api implements in request and Response

//************how to api implements in request and Response********************


        $data = array();
        $data['response'] = "success";
        $data['data'] = array();
        $data['data']['transid']=$tid;


        $request = json_encode(getRequestHeadersf());
        $response = print_response(200,'success',$data);
        $ipaddress = json_encode(getIpaddress());   
        $type="1";
        $apiMethod="GET";

        $username="select usernm from usertransactions
        INNER JOIN usermst
        ON usertransactions.userid=usermst.userid
        where usertransid=$tid";
        wh_log($username);
        $resa=mysql_query($username);   
        $resultuname=mysql_fetch_array($resa);
        $uname=$resultuname['usernm'];
        wh_log($uname);
        writeapilog($request,$response,$ipaddress,$apiMethod,$type,$uname);   
Share on Google Plus

About quora Questions & Answers A-Z

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment