小编Joe*_*wis的帖子

使用PHP解析实时SOAP数据流

我有一个企业应用程序,它提供了一个相当强大的API来收集数据.目前,我每秒都在循环中查询每个用户.但是,新的API文档现在提供了所有用户的所有更改的实时流.我想知道如何解析这个实时数据,因为它附带了PHP.以下是一些细节:

通过SOAP请求请求数据,我使用PHP来发出这样的请求(会话启动示例返回唯一ID):

//Get a session ID for this user for the shoretel WEBAPI
$soap_url = 'http://11.11.11.11:8070/ShoreTelWebSDK?wsdl';
$client = new SOAPClient($soap_url, array( 'proxy_host' => '11.11.11.11', 'proxy_port' => 8070, 'trace' => 1 ) );
$client = new SoapClient($soap_url);

$header = new SoapHeader('http://www.ShoreTel.com/ProServices/SDK/Web');
$client->__setSoapHeaders($header);
$registered_string = $client->RegisterClient(array(
                'clientName' => '11.11.11.211'
            )); 
$registered_string = get_object_vars($registered_string);   
$session =  $registered_string['RegisterClientResult'];
Run Code Online (Sandbox Code Playgroud)

新方法允许我指定时间段.例如,如果我希望所有事件都持续1分钟,则会启动呼叫,等待一分钟,然后返回该分钟内发生的所有事件.

我想要做的是抓住每个事件,并将其插入数据库.这是我可以用PHP完成的事情,还是我需要寻找另一种语言才能实现这一目标?

php soap

12
推荐指数
1
解决办法
1339
查看次数

面向 iframe 的表单在 FireFox 中不起作用

我有一个针对隐藏 iframe 的表单。这对于 IE 来说工作正常,但是当在 FireFox 中提交表单时没有任何反应。尚未提交。知道是什么造成了差异吗?

表单和 iframe 在这里:

<form name="dial" method="get" target="callout" action="/cgi-bin/make_call.php">    
    &nbsp;&nbsp;&nbsp;
    <input type="text" style="width:190px;" id="calling" name="calling" />
    <input type="hidden" name="caller" value="<? echo $extension; ?>">
    &nbsp;&nbsp;
    <input type="submit" name="search" class="btn btn-info btn-large" style="width:65px; height: 30px; position:relative;top:-5px;left:-2px; padding:0.2em; " value="Dial" />
</form>
<iframe name="callout" width="0" height="0"></iframe>
Run Code Online (Sandbox Code Playgroud)

正在加载的页面是:

<?
$caller = $_GET['caller'];
$calling = $_GET['calling'];

//Clean the non numbers out of our string
$calling = preg_replace("/[^0-9]/","",$calling);

//If we are dialing a 7 digit number add a 9 to …
Run Code Online (Sandbox Code Playgroud)

html php firefox

5
推荐指数
1
解决办法
2250
查看次数

为什么在Visual Studio中缺少Visual Studio 2012的选项 - Windows XP(v110_xp)?

我试图用C++编写一个程序在windows xp机器上运行,但是当我将工具集设置为Visual Studio 2012 - Windows XP(v110_xp)时,它就丢失了.我所拥有的只是Visual Studio 2012(v110).有谁知道如何获得其他选项?

c++ visual-studio-2012

3
推荐指数
1
解决办法
5611
查看次数

MYSQL从子查询中选择列表中的项目

提前感谢您提供的任何帮助.今天早上我被困在这个上几个小时,我搜索的任何内容似乎都没有帮助.

我将与客户端关联的帐户列表存储为我的数据库中的字符串,如下所示:

   | li.client_accounts   |
   +-----+----------------+
   |ID   |facility        |
   +-----+----------------+
   |23   |1010, 1020, 1025|
   +-----+----------------+
Run Code Online (Sandbox Code Playgroud)

我正在尝试从另一个数据库中选择约会,其中帐号在列表中,使用如下子查询:

    SELECT * FROM li_appointments.li_appointments
    where app_client_id in (select facility from li_client_accounts where id = 23)
Run Code Online (Sandbox Code Playgroud)

但是我的结果只显示了client_id为1010的约会,而忽略了其余的约会.为了让这个工作,我需要做什么?

mysql

2
推荐指数
1
解决办法
1999
查看次数

如何使我的全选复选框忽略禁用的项目?

我使用Javascript来允许用户检查表单中的所有项目.但是,即使它们被禁用,它也会检查项目.有没有办法让这只适用于启用的复选框?

    <script>
    $(document).ready(function () {
        $('#selectall').on('click', function () {
            $('.lv').prop('checked', isChecked('selectall'));
        });
    });
    function isChecked(checkboxId) {
        var id = '#' + checkboxId;
        return $(id).is(":checked");
    }
    function resetSelectAll() {
        // if all check box are selected, check the selectall checkbox
        // and vice versa
        if ($(".lv").length == $(".lv:checked").length) {
            $("#selectall").attr("checked", "checked");
        } else {
            $("#selectall").removeAttr("checked");
        }

        if ($(".lv:checked").length > 0) {
            $('#edit').attr("disabled", false);
        } else {
            $('#edit').attr("disabled", true);
        }
    }
    </script>
Run Code Online (Sandbox Code Playgroud)

javascript

1
推荐指数
1
解决办法
314
查看次数

标签 统计

php ×2

c++ ×1

firefox ×1

html ×1

javascript ×1

mysql ×1

soap ×1

visual-studio-2012 ×1