webrpc and php


        Dictionary parameters = new Dictionary();
        parameters.Add("name", "Nico Yazawa");
        parameters.Add("age", "17");
        PhotonNetwork.WebRpc("webhook", parameters);
Hello,
I want to know how do you retrieve the parameters sent with php ?

Comments

  • Hi @Sheiyla,

    Are you asking on how to retrieve WebRPC response from PUN?
    If so then you have the callback for that:
    OnWebRpcResponse(OperationResponse response)

    You just need to return JSON in this format: {ResultCode:0, Data:data}
  • not just I want to retrieve the parameters send the client to the cloud webrpc with php
  • JohnTubeJohnTube mod
    edited October 2016
    This is a PHP question then you should ask on Google/Stackoverflow how to parse JSON body from HTTP request in PHP.

    You may try searching the forum or Unity forums for WebRPC implementations in PHP.

    We do not have a sample or demo for this sorry.
  • the problem is that you give any information because i use $_GET or $_POST or $_REQUEST and does not return information send by the webrpc so I wonder to or benefit and are therefore not to photon me if I can not use this system.
  • Please try this:
    $json = file_get_contents('php://input');
    $data = json_decode($json);
  • Hi @Sheiyla, did it help?
Sign In or Register to comment.