<function name="rpcf_get_groups_list" id="0x2400"> <input> <integer name="user_id" /> </input> <output> <integer name="groups_count" /> <for name="i" from="0" count="groups_count"> <integer name="group_id" array_index="i" /> <string name="group_name" array_index="i" /> </for> </output> </function>
function rpcf_get_groups_list($user_id=0) { //0x2400 $ret=array(); if (!$this->connection->urfa_call(0x2400)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet = $this->connection->getPacket(); $packet->DataSetInt($user_id); $this->connection->urfa_send_param($packet); $x = $this->connection->urfa_get_data(); $count=$x->DataGetInt(); $ret['count']=$count; for ($i=0;$i<$count;$i++) { // $x = $this->connection->urfa_get_data(); $group['group_id']=$x->DataGetInt(); $group['group_name']=$x->DataGetString(); $ret['group'][]=$group; } // $this->connection->urfa_get_data(); return $ret; }