urfaclient на php

Вопросы по сопутствующим продуктам производства партнеров
Ответить
Cramac
Сообщения: 454
Зарегистрирован: Сб июл 01, 2006 17:59

Сообщение Cramac »

Всем привет. Подскажите. как с помощью урфапхп можно изменить логин и пароль в услуге "передача ИП трафика" ?

Cramac
Сообщения: 454
Зарегистрирован: Сб июл 01, 2006 17:59

Сообщение Cramac »

А еще, выложите кто нить функцию
rpcf_add_service_to_user
А то в вики нет ее

dAverk
Сообщения: 43
Зарегистрирован: Сб июн 09, 2007 18:23

Сообщение dAverk »

Если кто может - поделитесь рабочей версией для 009 на daverk [at] gmail [dot] com.
Собрал из вики + дифф руками + патч для пакета на x86_64, соединяется, но повисает на команде намертво :(

Код: Выделить всё

 Info  : Aug 02 13:15:48 f1cfab70 RPCServer@0.0.0.0: Client connecting: 127.0.0.1:46629
 Info  &#58; Aug 02 13&#58;15&#58;48 f1cfab70 RPCConn&#58; Connection from&#58; 127.0.0.1&#58;46629 new Session Key <44acdc53980202329c21c16de0afb5cb>
 Info  &#58; Aug 02 13&#58;15&#58;48 f1cfab70 RPCConn&#58; Card user <init@127.0.0.1> is connecting
 Info  &#58; Aug 02 13&#58;15&#58;48 f1cfab70 RPCConn&#91;SSL&#93;<init@127.0.0.1>&#58; Access granted to &#91;SSL&#93;<init@127.0.0.1> &#40;UID&#58; -1&#41;
?Debug &#58; Aug 02 13&#58;15&#58;48 f1cfab70 RPCConn&#91;SSL&#93;<init@127.0.0.1>&#58; SSL type requested&#58; SSLv3&#40;4&#41;
?Debug &#58; Aug 02 13&#58;15&#58;48 f1af8b70 RPCConn&#91;SSL&#93;<test@127.0.0.1>&#58; Call&#58; 0xffffbffa &#40;__rpcs_get_user_info&#41;
?Debug &#58; Aug 02 13&#58;15&#58;48 f1af8b70 RPCConn&#91;SSL&#93;<test@127.0.0.1>&#58; Real Call&#58; 0xffffbffa &#40;__rpcs_get_user_info&#41;
?Debug &#58; Aug 02 13&#58;15&#58;48 f1af8b70 RPCConn&#91;SSL&#93;<test@127.0.0.1>&#58; Call 0xffffbffa &#40;__rpcs_get_user_info&#41; finished...
?Debug &#58; Aug 02 13&#58;15&#58;48 f1af8b70 RPCConn&#91;SSL&#93;<test@127.0.0.1>&#58; Stream cleared

[-Alt-]
Сообщения: 13
Зарегистрирован: Ср апр 22, 2009 10:16

Сообщение [-Alt-] »

Версия которую сейчас тестирую на 5.3_002_update8, админские функции вроде работают, юзерские не все.
https://bitbucket.org/altlc/urfa-php/

mrmix25
Сообщения: 104
Зарегистрирован: Вт июн 07, 2011 11:43

Сообщение mrmix25 »

[-Alt-] писал(а):Версия которую сейчас тестирую на 5.3_002_update8, админские функции вроде работают, юзерские не все.
https://bitbucket.org/altlc/urfa-php/
нашел при тестировании в URFAClient_Admin.php
function rpcf_add_periodic_service_link_ex($service) { //0x2930 - устарела ее заменили на
function rpcf_add_periodic_slink_ex($service) { //0x2936

код

Код: Выделить всё

function rpcf_add_periodic_slink_ex&#40;$service&#41; &#123; //0x2936
            $ret = array&#40;&#41;;
            if &#40;!$this->connection->urfa_call&#40;0x2936&#41;&#41; &#123;
                print "Error calling function ". __FUNCTION__ ."\n";
                return FALSE;
            &#125;

            if&#40;!isset&#40;$service&#91;'tariff_link_id'&#93;&#41;&#41; $service&#91;'tariff_link_id'&#93; = 0;
            if&#40;$service&#91;'start_date'&#93; == 0&#41; $service&#91;'start_date'&#93; = now&#40;&#41;; 
            if&#40;$service&#91;'expire_date'&#93; == 0&#41; $service&#91;'expire_date'&#93; = max_time&#40;&#41;;  
            if&#40;!isset&#40;$service&#91;'cost_coef'&#93;&#41;&#41; $service&#91;'cost_coef'&#93; = 1;
            if&#40;!isset&#40;$service&#91;'unabon'&#93;&#41;&#41; $service&#91;'unabon'&#93; = 0;

            $packet = $this->connection->getPacket&#40;&#41;;
            $packet->DataSetInt&#40;$service&#91;'user_id'&#93;&#41;;
            $packet->DataSetInt&#40;$service&#91;'account_id'&#93;&#41;;
            $packet->DataSetInt&#40;$service&#91;'service_id'&#93;&#41;;
            $packet->DataSetInt&#40;$service&#91;'tariff_link_id'&#93;&#41;;
            $packet->DataSetInt&#40;$service&#91;'discount_period_id'&#93;&#41;;
            $packet->DataSetInt&#40;$service&#91;'start_date'&#93;&#41;;
            $packet->DataSetInt&#40;$service&#91;'expire_date'&#93;&#41;;
			$packet->DataSetInt&#40;$service&#91;'policy_id'&#93;&#41;;
            $packet->DataSetInt&#40;$service&#91;'unabon'&#93;&#41;;
            $packet->DataSetDouble&#40;$service&#91;'cost_coef'&#93;&#41;;

            $this->connection->urfa_send_param&#40;$packet&#41;;
            if &#40;$x = $this->connection->urfa_get_data&#40;&#41;&#41;&#123;
                $ret&#91;'slink_id'&#93; = $x->DataGetInt&#40;&#41;;
            &#125;else&#123;
                $ret&#91;'slink_id'&#93; = -1;
            &#125;
            return $ret;
        &#125; 

[-Alt-]
Сообщения: 13
Зарегистрирован: Ср апр 22, 2009 10:16

Сообщение [-Alt-] »

Спасибо, выложил

mrmix25
Сообщения: 104
Зарегистрирован: Вт июн 07, 2011 11:43

Сообщение mrmix25 »

не было function rpcf_get_ippools_list
может кому пригодится
код

Код: Выделить всё

       function rpcf_get_ippools_list&#40;&#41; &#123; //0x1067
            $ret=array&#40;&#41;;
            if &#40;!$this->connection->urfa_call&#40;0x1067&#41;&#41; &#123;
                print "Error calling function ". __FUNCTION__ ."\n";
                return FALSE;
            &#125;
            $x = $this->connection->urfa_get_data&#40;&#41;;
            $count = $x->DataGetInt&#40;&#41;;
            $ret&#91;'ippools_count'&#93; = $count;
            for &#40;$i=0;$i<$count;$i++&#41; &#123;
                $pool&#91;'id'&#93;=$x->DataGetInt&#40;&#41;;
                $pool&#91;'name'&#93;=$x->DataGetString&#40;&#41;;
                $pool&#91;'address'&#93;=$x->DataGetIP46Address&#40;&#41;;
                $pool&#91;'mask'&#93;=$x->DataGetInt&#40;&#41;;
                $ret&#91;'ippools'&#93;&#91;&#93;=$pool;
            &#125;
            return $ret;
        &#125;

[-Alt-]
Сообщения: 13
Зарегистрирован: Ср апр 22, 2009 10:16

Сообщение [-Alt-] »

Добавил

mrmix25
Сообщения: 104
Зарегистрирован: Вт июн 07, 2011 11:43

Сообщение mrmix25 »

ещё немного функций

Код: Выделить всё

        function rpcf_get_tariff_new&#40;$tariff_id&#41; &#123; //0x3040
            $ret=array&#40;&#41;;
            if &#40;!$this->connection->urfa_call&#40;0x3040&#41;&#41; &#123;
                print "Error calling function ". __FUNCTION__ ."\n";
                return FALSE;
            &#125;
            $packet = $this->connection->getPacket&#40;&#41;;
            $packet->DataSetInt&#40;$tariff_id&#41;;
            $this->connection->urfa_send_param&#40;$packet&#41;;
            if &#40;$x = $this->connection->urfa_get_data&#40;&#41;&#41; &#123;
                $ret&#91;'tariff_name'&#93; = $x->DataGetString&#40;&#41;;
                $ret&#91;'tariff_create_date'&#93; = $x->DataGetInt&#40;&#41;;
                $ret&#91;'who_create'&#93; = $x->DataGetInt&#40;&#41;;
                $ret&#91;'who_create_login'&#93; = $x->DataGetString&#40;&#41;;
                $ret&#91;'tariff_change_date'&#93; = $x->DataGetInt&#40;&#41;;
                $ret&#91;'who_change'&#93; = $x->DataGetInt&#40;&#41;;
                $ret&#91;'who_change_login'&#93; = $x->DataGetString&#40;&#41;;
                $ret&#91;'tariff_balance_rollover'&#93; = $x->DataGetInt&#40;&#41;;
				$ret&#91;'comments'&#93; = $x->DataGetString&#40;&#41;;
                $ret&#91;'services_count'&#93; = $x->DataGetInt&#40;&#41;;
                for &#40;$i=0;$i<$ret&#91;'services_count'&#93;;$i++&#41; &#123;
                    $service&#91;'service_id'&#93; = $x->DataGetInt&#40;&#41;;
                    $service&#91;'service_type'&#93; = $x->DataGetInt&#40;&#41;;
                    $service&#91;'service_name'&#93; = $x->DataGetString&#40;&#41;;
                    $service&#91;'comment'&#93; = $x->DataGetString&#40;&#41;;
                    $service&#91;'link_by_default'&#93; = $x->DataGetInt&#40;&#41;;
                    $service&#91;'is_dynamic'&#93; = $x->DataGetInt&#40;&#41;;
                    $ret&#91;'services'&#93;&#91;&#93;=$service;
                &#125;
            &#125;
            return $ret;
        &#125;

Код: Выделить всё

  		function rpcf_get_periodic_service_ex&#40;$sid&#41; &#123; //0x2130
            $ret=array&#40;&#41;;
            if &#40;!$this->connection->urfa_call&#40;0x2130&#41;&#41; &#123;
                print "Error calling function ". __FUNCTION__ ."\n";
                return FALSE;
            &#125;
            $packet = $this->connection->getPacket&#40;&#41;;
            $packet->DataSetInt&#40;$sid&#41;;
            $this->connection->urfa_send_param&#40;$packet&#41;;
            if &#40;$x = $this->connection->urfa_get_data&#40;&#41;&#41; &#123;
                $ret&#91;'service_name'&#93;=$x->DataGetString&#40;&#41;;
                $ret&#91;'comment'&#93;=$x->DataGetString&#40;&#41;;
                $ret&#91;'link_by_default'&#93;=$x->DataGetInt&#40;&#41;;
                $ret&#91;'cost'&#93;=$x->DataGetDouble&#40;&#41;;
                $ret&#91;'deprecated'&#93;=$x->DataGetInt&#40;&#41;;
                $ret&#91;'discount_method'&#93;=$x->DataGetInt&#40;&#41;;
                $ret&#91;'param'&#93;=$x->DataGetInt&#40;&#41;;
				$ret&#91;'tariff_id'&#93;=$x->DataGetInt&#40;&#41;;
                $ret&#91;'parent_id'&#93;=$x->DataGetInt&#40;&#41;;
            &#125;
            return $ret;
        &#125;

Код: Выделить всё

		function rpcf_get_iptraffic_service_ex&#40;$sid&#41; &#123; //0x2134
            $service = array&#40;&#41;; 
            if &#40;!$this->connection->urfa_call&#40;0x2134&#41;&#41; &#123; 
                print "Error calling function ". __FUNCTION__ ."\n"; 
                return FALSE; 
            &#125;

            $packet = $this->connection->getPacket&#40;&#41;; 
            
            $packet->DataSetInt&#40;$sid&#41;; 
            $this->connection->urfa_send_param&#40;$packet&#41;;  

            if &#40;$x = $this->connection->urfa_get_data&#40;&#41;&#41; &#123;
				$ret&#91;'service_name'&#93;=$x->DataGetString&#40;&#41;;
				$ret&#91;'comment'&#93;=$x->DataGetString&#40;&#41;;
				$ret&#91;'link_by_default'&#93;=$x->DataGetInt&#40;&#41;;
				$ret&#91;'is_dynamic'&#93;=$x->DataGetInt&#40;&#41;;
				$ret&#91;'cost'&#93;=$x->DataGetDouble&#40;&#41;;
				$ret&#91;'deprecated'&#93;=$x->DataGetInt&#40;&#41;;
				$ret&#91;'discount_method'&#93;=$x->DataGetInt&#40;&#41;;
				$ret&#91;'sessions_limit'&#93;=$x->DataGetInt&#40;&#41;;
				$ret&#91;'null_service_prepaid'&#93;=$x->DataGetInt&#40;&#41;;
				$ret&#91;'borders_count'&#93;=$x->DataGetInt&#40;&#41;;
				for&#40;$i=0; $i<$ret&#91;'borders_count'&#93;; $i++&#41; &#123;
					$ret&#91;'borders'&#93;&#91;$i&#93;&#91;'tclass'&#93;=$x->DataGetInt&#40;&#41;;
					if&#40;$ret&#91;'borders'&#93;&#91;$i&#93;&#91;'tclass'&#93; != -1&#41; &#123;
						$ret&#91;'borders'&#93;&#91;$i&#93;&#91;'borders_size'&#93; = $x->DataGetLong&#40;&#41;;
						for&#40;$j=0; $j<$ret&#91;'borders'&#93;&#91;$i&#93;&#91;'borders_size'&#93;; $j++&#41; &#123;
							$ret&#91;'borders'&#93;&#91;$i&#93;&#91;'border'&#93;&#91;$j&#93;&#91;'border_id'&#93; = $x->DataGetLong&#40;&#41;;
							$ret&#91;'borders'&#93;&#91;$i&#93;&#91;'border'&#93;&#91;$j&#93;&#91;'border_cost'&#93; = $x->DataGetDouble&#40;&#41;;
						&#125;
					&#125;
				&#125;
				$ret&#91;'prepaid_count'&#93;=$x->DataGetInt&#40;&#41;;
				for&#40;$i=0;$i<$ret&#91;'prepaid_count'&#93;;$i++&#41; &#123;
					$ret&#91;'prepaid'&#93;&#91;$i&#93;&#91;'tclass'&#93; = $x->DataGetInt&#40;&#41;;
					if&#40;$ret&#91;'prepaid'&#93;&#91;$i&#93;&#91;'tclass'&#93; != -1&#41; &#123;
						$ret&#91;'prepaid'&#93;&#91;$i&#93;&#91;'prepaid_amount'&#93; = $x->DataGetLong&#40;&#41;;
						$ret&#91;'prepaid'&#93;&#91;$i&#93;&#91;'prepaid_max'&#93; = $x->DataGetLong&#40;&#41;;
					&#125;
				&#125;
				$ret&#91;'tclass_id2group_size'&#93; = $x->DataGetInt&#40;&#41;;
				for&#40;$i=0;$i<$ret&#91;'tclass_id2group_size'&#93;;$i++&#41; &#123;
					$ret&#91;'tclass_id2group'&#93;&#91;$i&#93;&#91;'tclass_id'&#93; = $x->DataGetInt&#40;&#41;;
					$ret&#91;'tclass_id2group'&#93;&#91;$i&#93;&#91;'tclass_group_id'&#93; = $x->DataGetInt&#40;&#41;;
				&#125;
				$ret&#91;'service_data_parent_id'&#93; = $x->DataGetInt&#40;&#41;;
				$ret&#91;'tariff_id'&#93; = $x->DataGetInt&#40;&#41;;
				$ret&#91;'parent_id'&#93; = $x->DataGetInt&#40;&#41;;
			&#125;
			return $ret;

		&#125;	

banec
Сообщения: 269
Зарегистрирован: Вт сен 11, 2007 09:06

Сообщение banec »

[-Alt-] писал(а):Версия которую сейчас тестирую на 5.3_002_update8, админские функции вроде работают, юзерские не все.
https://bitbucket.org/altlc/urfa-php/
при подключении .php
PHP Parse error: syntax error, unexpected '[' in /netup/php/URFAClient_Admin.php on line 847

banec
Сообщения: 269
Зарегистрирован: Вт сен 11, 2007 09:06

Сообщение banec »

Подскажите как в сервисных связках урфой скорректировать стоимость в процентах? установить вместо 100% - 90%

mrmix25
Сообщения: 104
Зарегистрирован: Вт июн 07, 2011 11:43

Сообщение mrmix25 »

function rpcf_edit_periodic_slink_ex($service) { //0x2923 устарела
заменили на
function rpcf_edit_periodic_slink_ex($service) { //0x2937

Код: Выделить всё

        function rpcf_edit_periodic_slink_ex&#40;$service&#41; &#123; //0x2937
            $ret = array&#40;&#41;; 
            if &#40;!$this->connection->urfa_call&#40;0x2937&#41;&#41; &#123; 
                print "Error calling function ". __FUNCTION__ ."\n"; 
                return FALSE; 
            &#125; 
            $packet = $this->connection->getPacket&#40;&#41;; 
            $packet->DataSetInt&#40;$service&#91;'slink_id'&#93;&#41;; 
            if&#40;$service&#91;'start_date'&#93; == 0&#41; $service&#91;'start_date'&#93; = now&#40;&#41;; 
            $packet->DataSetInt&#40;$service&#91;'start_date'&#93;&#41;; 
            if&#40;$service&#91;'expire_date'&#93; == 0&#41; $service&#91;'expire_date'&#93; = max_time&#40;&#41;; 
            $packet->DataSetInt&#40;$service&#91;'expire_date'&#93;&#41;; 
			$packet->DataSetInt&#40;$service&#91;'policy_id'&#93;&#41;;
			$packet->DataSetDouble&#40;$service&#91;'cost_coef'&#93;&#41;;
            $this->connection->urfa_send_param&#40;$packet&#41;; 
            if&#40;$x = $this->connection->urfa_get_data&#40;&#41;&#41; &#123;
                $ret&#91;'slink_id'&#93;=$x->DataGetInt&#40;&#41;; 
            &#125; else &#123; 
                return -1; 
            &#125;
            return $ret; 
        &#125;

mrmix25
Сообщения: 104
Зарегистрирован: Вт июн 07, 2011 11:43

Сообщение mrmix25 »

banec писал(а):Подскажите как в сервисных связках урфой скорректировать стоимость в процентах? установить вместо 100% - 90%
$service['cost_coef'] = 1; // 100%

$service['cost_coef'] = 0.9; //90%

пример:

Код: Выделить всё

$service = $urfa_admin->rpcf_get_periodic_service_link&#40;9031&#41;; // получаем инфу о периодической услуге необходимо знать id связки
//редактируем нужное и добавляем обязательный slink_id
$service&#91;'slink_id'&#93; = 9031; // id связки
$service&#91;'policy_id'&#93; = 1; // id политики списания
$service&#91;'cost_coef'&#93; = 0.9; // стоимость в %
$urfa_admin->rpcf_edit_periodic_slink_ex&#40;$service&#41;; // применяем

mrmix25
Сообщения: 104
Зарегистрирован: Вт июн 07, 2011 11:43

Сообщение mrmix25 »

файл URFAClient_User5.php
function rpcf_user5_dhs_report - не работала.
немного подправил и все ок

Код: Выделить всё

          function rpcf_user5_dhs_report&#40;$start_date,$end_date&#41; &#123; //-0x4017 
            $ret=array&#40;&#41;; 
            if &#40;!$this->connection->urfa_call&#40;-0x4017&#41;&#41; &#123; 
                print "Error calling function ". __FUNCTION__ ."\n"; 
                return FALSE; 
            &#125; 
            $packet = $this->connection->getPacket&#40;&#41;;
			if&#40;$start_date == 0&#41; $start_date = now&#40;&#41; -1*30*24*60*60; 
            if&#40;$end_date == 0&#41; $end_date = max_time&#40;&#41;;
            $packet->DataSetInt&#40;$start_date&#41;; 
            $packet->DataSetInt&#40;$end_date&#41;; 
            $this->connection->urfa_send_param&#40;$packet&#41;; 
            if &#40;$x = $this->connection->urfa_get_data&#40;&#41;&#41; &#123; 
                $ret&#91;'dhs_log_size'&#93; = $x->DataGetInt&#40;&#41;; 
                for &#40;$i=0;$i<$ret&#91;'dhs_log_size'&#93;;$i++&#41; &#123; 
                    $session&#91;'id'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'account_id'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'slink_id'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'recv_date'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'last_update_date'&#93; = $x->DataGetInt&#40;&#41;;					
                    $session&#91;'framed_ip'&#93; = $x->DataGetIP46Address&#40;&#41;;
					$session&#91;'framed_ip6'&#93; = $x->DataGetIP46Address&#40;&#41;;
                    $session&#91;'nas_port'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'acct_session_id'&#93; = $x->DataGetString&#40;&#41;; 
                    $session&#91;'nas_port_type'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'uname'&#93; = $x->DataGetString&#40;&#41;; 
                    $session&#91;'service_type'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'framed_protocol'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'nas_id'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'nas_ip'&#93; = $x->DataGetString&#40;&#41;; 
                    $session&#91;'acct_status_type'&#93; = $x->DataGetInt&#40;&#41;; 
                    $session&#91;'acct_inp_pack'&#93; = $x->DataGetLong&#40;&#41;; 
                    $session&#91;'acct_inp_oct'&#93; = $x->DataGetLong&#40;&#41;; 
                    $session&#91;'acct_out_pack'&#93; = $x->DataGetLong&#40;&#41;; 
                    $session&#91;'acct_out_oct'&#93; = $x->DataGetLong&#40;&#41;; 
                    $session&#91;'acct_sess_time'&#93; = $x->DataGetLong&#40;&#41;; 
                    $session&#91;'dhs_sessions_detail_size'&#93; = $x->DataGetInt&#40;&#41;; 
                    for&#40;$j=0;$j<$session&#91;'dhs_sessions_detail_size'&#93;;$j++&#41; &#123; 
                        $session&#91;'dhs_sessions_detail_list'&#93;&#91;$j&#93;&#91;'trange_id'&#93; = $x->DataGetInt&#40;&#41;; 
                        $session&#91;'dhs_sessions_detail_list'&#93;&#91;$j&#93;&#91;'account_id'&#93; = $x->DataGetInt&#40;&#41;; 
                        $session&#91;'dhs_sessions_detail_list'&#93;&#91;$j&#93;&#91;'duration'&#93; = $x->DataGetLong&#40;&#41;; 
                        $session&#91;'dhs_sessions_detail_list'&#93;&#91;$j&#93;&#91;'base_cost'&#93; = $x->DataGetDouble&#40;&#41;; 
                        $session&#91;'dhs_sessions_detail_list'&#93;&#91;$j&#93;&#91;'sum_cost'&#93; = $x->DataGetDouble&#40;&#41;; 
                    &#125; 
                    $ret&#91;'sessions'&#93;&#91;&#93;=$session; 
                &#125; 
            &#125; 
            return $ret; 
        &#125;
Последний раз редактировалось mrmix25 Вт сен 30, 2014 19:06, всего редактировалось 1 раз.

banec
Сообщения: 269
Зарегистрирован: Вт сен 11, 2007 09:06

Сообщение banec »

mrmix25 спасибо

Но ещё прикол на php5.3 работает но на 5.4 и выше вообще глухо - даже ошибок не выдаёт
кто запускал на >php5.4 ?


PS там на серваке зенду нужна 5.4 и выше

Код: Выделить всё

PHP Warning&#58;  fread&#40;&#41;&#58; SSL read operation timed out in /disk2/1/netup/php/URFAClient_Packet.php on line 31

Warning&#58; fread&#40;&#41;&#58; SSL read operation timed out in /disk2/1/netup/php/URFAClient_Packet.php on line 31
PHP Warning&#58;  fread&#40;&#41;&#58; SSL read operation timed out in /disk2/1/netup/php/URFAClient_Packet.php on line 32

Warning&#58; fread&#40;&#41;&#58; SSL read operation timed out in /disk2/1/netup/php/URFAClient_Packet.php on line 32
PHP Warning&#58;  fread&#40;&#41;&#58; SSL read operation timed out in /disk2/1/netup/php/URFAClient_Packet.php on line 33

Warning&#58; fread&#40;&#41;&#58; SSL read operation timed out in /disk2/1/netup/php/URFAClient_Packet.php on line 33
PHP Fatal error&#58;  Uncaught exception 'Exception' with message 'Error code 0' in /disk2/1/netup/php/URFAClient_Packet.php&#58;33
Stack trace&#58;
#0 /disk2/1/netup/php/URFAClient_Connection.php&#40;145&#41;&#58; URFAClient_Packet->read&#40;&#41;
#1 /disk2/1/netup/php/URFAClient_Admin.php&#40;1716&#41;&#58; URFAClient_Connection->urfa_get_data&#40;&#41;
#2 /disk2/1/netup/php/examle.php&#40;28&#41;&#58; URFAClient_Admin->rpcf_get_accountinfo&#40;901065&#41;
#3 &#123;main&#125;
  thrown in /disk2/1/netup/php/URFAClient_Packet.php on line 33

Fatal error&#58; Uncaught exception 'Exception' with message 'Error code 0' in /disk2/1/netup/php/URFAClient_Packet.php&#58;33
Stack trace&#58;
#0 /disk2/1/netup/php/URFAClient_Connection.php&#40;145&#41;&#58; URFAClient_Packet->read&#40;&#41;
#1 /disk2/1/netup/php/URFAClient_Admin.php&#40;1716&#41;&#58; URFAClient_Connection->urfa_get_data&#40;&#41;
#2 /disk2/1/netup/php/examle.php&#40;28&#41;&#58; URFAClient_Admin->rpcf_get_accountinfo&#40;901065&#41;
#3 &#123;main&#125;
  thrown in /disk2/1/netup/php/URFAClient_Packet.php on line 33
соответственно что не проходит

function read()
{

$this->code = ord(fread($this->sock, 1));
if ($this->version != ord(fread($this->sock, 1))) {
throw new Exception("Error code " . ord(fread($this->sock, 1)));
} else {
list(, $this->len) = unpack("n", fread($this->sock, 2));
$this->parse_packet_data();
}
}
CentOS6.5
PHP 5.5.17 (cli) (built: Sep 18 2014 21:19:14)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies

ЗЫ
попробовал на дебиане

Код: Выделить всё

PHP 5.4.4-14+deb7u14 &#40;cli&#41; &#40;built&#58; Aug 21 2014 08&#58;36&#58;44&#41;
Copyright &#40;c&#41; 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright &#40;c&#41; 1998-2012 Zend Technologies
root@cabinet5&#58;~/php# php examle.php
/n<BR>****************************************<BR>Array
&#40;
    &#91;is_blocked&#93; => 0
    &#91;vat_rate&#93; => 0
    &#91;sale_tax_rate&#93; => 0
    &#91;credit&#93; => 0
    &#91;balance&#93; => 13667.210850395
    &#91;int_status&#93; => 1
    &#91;unlimited&#93; => 0
    &#91;auto_enable_inet&#93; => 0
    &#91;external_id&#93; =>
&#41;
прокатило - чего ему на центе не хватает хз

Ответить