当前位置: 首页>>代码示例>>PHP>>正文


PHP curl::setUrlHost方法代码示例

本文整理汇总了PHP中curl::setUrlHost方法的典型用法代码示例。如果您正苦于以下问题:PHP curl::setUrlHost方法的具体用法?PHP curl::setUrlHost怎么用?PHP curl::setUrlHost使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在curl的用法示例。


在下文中一共展示了curl::setUrlHost方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: settings_process

 /**
  * 配置更新前处理
  *
  */
 protected function settings_process()
 {
     if ($this->settings['schedule_control_wowza']['is_wowza'] && ($this->settings['App_schedule'] || $this->settings['App_live_control'])) {
         if (!$this->settings['schedule_control_wowza']['is_wowza']) {
             $this->input['base']['schedule_control_wowza'] = array();
             //$this->errorOutput('请修改配置选项schedule_control_wowza=>is_wowza以启用播控');
         } else {
             $this->input['base']['schedule_control_wowza']['is_wowza'] = 1;
             if (!$this->input['base']['schedule_control_wowza']['host']) {
                 $this->errorOutput('请设置wowza主机');
             }
             if (!$this->input['base']['schedule_control_wowza']['inputdir']) {
                 $this->errorOutput('请设置wowza目录');
             }
         }
         $curl = new curl();
         $curl->initPostData();
         $curl->setSubmitType('post');
         $curl->addRequestData('base[server_info][host]', $this->input['base']['schedule_control_wowza']['host']);
         $curl->addRequestData('base[server_info][input_dir]', $this->input['base']['schedule_control_wowza']['inputdir']);
         $curl->addRequestData('a', 'doset');
         //
         if ($this->settings['App_schedule']) {
             //$this->errorOutput(var_export($this->settings['App_schedule'],1));
             $curl->setUrlHost($this->settings['App_schedule']['host'], $this->settings['App_schedule']['dir']);
             $ret = $curl->request('configuare.php');
             if (!$ret['success']) {
                 $this->errorOutput("同步串联单配置失败");
             }
         }
         if ($this->settings['App_live_control']) {
             $curl->setUrlHost($this->settings['App_live_control']['host'], $this->settings['App_live_control']['dir']);
             $ret = $curl->request('configuare.php');
             if (!$ret['success']) {
                 $this->errorOutput("同步播控配置失败");
             }
         }
     }
     $max_time_shift = intval($this->input['base']['max_time_shift']);
     $this->input['base']['max_time_shift'] = $max_time_shift > 0 ? $max_time_shift : 168;
 }
开发者ID:h3len,项目名称:Project,代码行数:45,代码来源:configuare.php

示例2: media_server_operate

 private function media_server_operate($time_shift_server, $data = array())
 {
     $curl = new curl();
     $curl->setUrlHost($time_shift_server['host'] . ($time_shift_server['port'] ? ':' . $time_shift_server['port'] : ''));
     $curl->setSubmitType('get');
     $curl->initPostData();
     $curl->setReturnFormat('json');
     foreach ($data as $k => $v) {
         $curl->addRequestData($k, $v);
     }
     $ret = $curl->request('');
     return xml2Array($ret);
 }
开发者ID:h3len,项目名称:Project,代码行数:13,代码来源:live_time_shift_server_update.php


注:本文中的curl::setUrlHost方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。