==== XML ==== ==== PHP ==== function rpcf_get_dhs_report($param) { // 0x5015 $ret=array(); if (!$this->connection->urfa_call(0x5015)) { print "Error calling function ". __FUNCTION__ ."\n"; return FALSE; } $packet = $this->connection->getPacket(); $packet->DataSetInt( $param['user_id'] ); $packet->DataSetInt( $param['account_id'] ); $packet->DataSetInt( $param['apid'] ); $packet->DataSetInt( $param['t_start'] ); $packet->DataSetInt( $param['t_end'] ); $this->connection->urfa_send_param($packet); if ( $x = $this->connection->urfa_get_data() ) { $ret['dhs_log_size'] = $x->DataGetInt(); for ( $i = 0; $i < $ret['dhs_log_size']; $i++ ) { $ari = array(); //$x = $this->connection->urfa_get_data(); //убрал, т.к. скрипт входил в бесконечный цикл $ari['id'] = $x->DataGetInt(); $ari['account_id'] = $x->DataGetInt(); $ari['slink_id'] = $x->DataGetInt(); $ari['recv_date'] = $x->DataGetInt(); $ari['last_update_date'] = $x->DataGetInt(); $ari['Called_Station_Id'] = $x->DataGetString(); $ari['Calling_Station_Id'] = $x->DataGetString(); $ari['framed_ip'] = $x->DataGetIPAddress(); $ari['nas_port'] = $x->DataGetInt(); $ari['acct_session_id'] = $x->DataGetString(); $ari['nas_port_type'] = $x->DataGetInt(); $ari['uname'] = $x->DataGetString(); $ari['service_type'] = $x->DataGetInt(); $ari['framed_protocol'] = $x->DataGetInt(); $ari['nas_ip'] = $x->DataGetIPAddress(); $ari['nas_id'] = $x->DataGetString(); $ari['acct_status_type'] = $x->DataGetInt(); $ari['acct_inp_pack'] = $x->DataGetLong(); $ari['acct_inp_oct'] = $x->DataGetLong(); $ari['acct_inp_giga'] = $x->DataGetLong(); $ari['acct_out_pack'] = $x->DataGetLong(); $ari['acct_out_oct'] = $x->DataGetLong(); $ari['acct_out_giga'] = $x->DataGetLong(); $ari['acct_sess_time'] = $x->DataGetLong(); $ari['acct_term_cause'] = $x->DataGetInt(); $ari['total_cost'] = $x->DataGetDouble(); $ret['dhs_log'][] = $ari; } } return $ret; }