我在php中有一个肥皂响应,它是多维对象和数组在一起,

时间:2018-08-14 14:06:11

标签: php api soap

我正在尝试将PHP中的Soap请求发送到Smartermail邮件服务器,并且它正在响应一个用波纹管编写的对象。

stdClass Object
(
    [GetAllDomainStatisticsResult] = stdClass Object
        (
            [Result] = 1
            [ResultCode] = 0
            [Message] = 
            [Stats] = stdClass Object
                (
                    [DomainStatInfo] = Array
                        (
                            [0] = stdClass Object
                                (
                                    [DomainName] = test0.com
                                    [MessagesReceived] = 0
                                    [MessagesSent] = 0
                                    [BytesReceived] = 0
                                    [BytesSent] = 0
                                    [BytesSize] = 349833
                                )

                            [1] = stdClass Object
                                (
                                    [DomainName] = test1.com
                                    [MessagesReceived] = 1
                                    [MessagesSent] = 0
                                    [BytesReceived] = 1060864
                                    [BytesSent] = 0
                                    [BytesSize] = 12491
                                )

                            [2] = stdClass Object
                                (
                                    [DomainName] = test2.com
                                    [MessagesReceived] = 143
                                    [MessagesSent] = 267
                                    [BytesReceived] = 1406976
                                    [BytesSent] = 2222080
                                    [BytesSize] = 1725522616
                                )

                            [3] = stdClass Object
                                (
                                    [DomainName] = test3.com
                                    [MessagesReceived] = 1
                                    [MessagesSent] = 0
                                    [BytesReceived] = 31744
                                    [BytesSent] = 0
                                    [BytesSize] = 126569
                                )

                            [4] = stdClass Object
                                (
                                    [DomainName] = test4.com
                                    [MessagesReceived] = 0
                                    [MessagesSent] = 0
                                    [BytesReceived] = 0
                                    [BytesSent] = 0
                                    [BytesSize] = 55342595
                                )

                            [5] = stdClass Object
                                (
                                    [DomainName] = test5.com
                                    [MessagesReceived] = 10
                                    [MessagesSent] = 3
                                    [BytesReceived] = 1527808
                                    [BytesSent] = 0
                                    [BytesSize] = 387125934
                                )

    .
    .
    .

如何使用该对象,我需要获取所有域统计信息数组,我想查找是否有任何域发送的电子邮件超过200个。 messageent> 200,然后给我域名。

我正在使用以下代码:

var_dump($mystring->GetAllDomainStatisticsResult->Stats->DomainStatInfo[1]->BytesSize);

但它向我发送了空值。

0 个答案:

没有答案