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


PHP transport::request方法代码示例

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


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

示例1: exchange_shop_license

/**
 * 功能:与 ECShop 交换数据
 *
 * @param   array $certi 登录参数
 * @param   array $license 网店license信息
 * @param   bool $use_lib 使用哪一个json库,0为ec,1为shopex
 * @return  array
 */
function exchange_shop_license($certi, $license, $use_lib = 0)
{
    $touch =& get_instance();
    if (!is_array($certi)) {
        return array();
    }
    $touch->load->library('transport');
    //    include_once(ROOT_PATH . 'includes/cls_transport.php');
    //    include_once(ROOT_PATH . 'includes/cls_json.php');
    $params = '';
    foreach ($certi as $key => $value) {
        $params .= '&' . $key . '=' . $value;
    }
    $params = trim($params, '&');
    $transport = new transport();
    //$transport->connect_timeout = 1;
    $request = $transport->request($license['certi'], $params, 'POST');
    $request_str = json_str_iconv($request['body']);
    //    if (empty($use_lib))
    //    {
    //$json = new JSON();
    $request_arr = json_decode($request_str, 1);
    //    }
    //    else
    //    {
    //        //include_once(ROOT_PATH . 'includes/shopex_json.php');
    //        $request_arr = json_decode($request_str, 1);
    //    }
    return $request_arr;
}
开发者ID:connwap135,项目名称:ectouch,代码行数:38,代码来源:license_helper.php

示例2: check_fee

 public function check_fee()
 {
     es_session::start();
     $last_visit = intval(es_session::get("last_visit_smsbao"));
     if (get_gmtime() - $last_visit > 10) {
         $sms = new transport();
         $params = array("u" => $this->sms['user_name'], "p" => md5($this->sms['password']));
         $url = "http://www.smsbao.com/query";
         $result = $sms->request($url, $params);
         $match = explode(',', $result['body']);
         if ($match[0] != '') {
             $remain = (int) $match[1];
             $str = sprintf('短信宝增值平台  剩余:%d 条', $remain);
         } else {
             $str = "短信宝增值平台 (<a href='http://www.smsbao.com/reg?r=5001' target='_blank'><font color='red'>还没账号?点击这免费注册</font></a>)";
         }
         es_session::set("smsbao_info", $str);
         es_session::set("last_visit_smsbao", get_gmtime());
         return $str;
     } else {
         $qxt_info = es_session::get("smsbao_info");
         if ($smsbao_info) {
             return $smsbao_info;
         } else {
             return "短信宝增值平台 (<a href='http://www.smsbao.com/reg?r=5001' target='_blank'><font color='red'>还没账号?点击这免费注册</font></a>)";
         }
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:28,代码来源:smsbao_sms.php

示例3: exchange_shop_license

/**
 * 功能:与 ECShop 交换数据
 *
 * @param   array     $certi    登录参数
 * @param   array     $license  网店license信息
 * @param   bool      $use_lib  使用哪一个json库,0为ec,1为shopex
 * @return  array
 */
function exchange_shop_license($certi, $license, $use_lib = 0)
{
    if (!is_array($certi)) {
        return array();
    }
    include_once ROOT_PATH . 'includes/cls_transport.php';
    include_once ROOT_PATH . 'includes/cls_json.php';
    $params = '';
    foreach ($certi as $key => $value) {
        $params .= '&' . $key . '=' . $value;
    }
    $params = trim($params, '&');
    $transport = new transport();
    //$transport->connect_timeout = 1;
    $request = $transport->request($license['certi'], $params, 'POST');
    $request_str = json_str_iconv($request['body']);
    if (empty($use_lib)) {
        $json = new JSON();
        $request_arr = $json->decode($request_str, 1);
    } else {
        include_once ROOT_PATH . 'includes/shopex_json.php';
        $request_arr = json_decode($request_str, 1);
    }
    return $request_arr;
}
开发者ID:dlpc,项目名称:ecshop,代码行数:33,代码来源:lib_license.php

示例4: check_fee

 public function check_fee()
 {
     $sms = new transport();
     $url = $this->sms['server_url'] . "get";
     $params = json_encode($this->sms);
     $result = $sms->request($url, $params);
     $result = json_decode($result['body'], 1);
     $str = $result['info'];
     return $str;
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:10,代码来源:FW_sms.php

示例5: check_fee

 public function check_fee()
 {
     $sms = new transport();
     $params = array("OperID" => $this->sms['user_name'], "OperPass" => $this->sms['password']);
     $url = "http://221.179.180.158:9000/QxtSms/surplus";
     $result = $sms->request($url, $params);
     $result = toArray($result['body'], "resRoot");
     $str = "企信通短信平台,剩余:" . $result['rcode'][0] . "条";
     return $str;
 }
开发者ID:xcdxcd,项目名称:zhongchou,代码行数:10,代码来源:QXT_sms.php

示例6: call

 public function call($operation, $params = '')
 {
     $this->log .= time() . ": call() called.\n";
     if (!stristr($this->url, 'http://')) {
         throw new Exception("URL self::{$url} is not correct.");
     }
     if (!empty($params)) {
         $call['method'] = $operation;
         $call['params'] = $params;
         $postdata = $this->rc4(json_encode($call));
         $postdata = 'call=' . str_replace('=', '', base64_encode($postdata));
         $http = new transport();
         $content = $http->request($this->url, $postdata);
         //$a = file_put_contents('debug.txt',base64_decode($content['body']));
         $cbody = $this->rc4(base64_decode($content['body']));
         return json_decode($cbody, true);
     } else {
         throw new Exception("params is empty.");
     }
 }
开发者ID:haseok86,项目名称:millkencode,代码行数:20,代码来源:webremote.php

示例7: locate_geo

 /**
  * 定位经续度
  * @param unknown_type $x 经度
  * @param unknown_type $y 纬度
  */
 public static function locate_geo($xpoint = 0, $ypoint = 0)
 {
     $xpoint = floatval($xpoint);
     $ypoint = floatval($ypoint);
     $current_geo = es_session::get("current_geo");
     if ($xpoint != 0) {
         $current_geo['xpoint'] = $xpoint;
         $current_geo['address'] = "";
     } elseif (empty($current_geo['xpoint'])) {
         $current_geo['xpoint'] = 0;
     }
     if ($ypoint != 0) {
         $current_geo['ypoint'] = $ypoint;
         $current_geo['address'] = "";
     } elseif (empty($current_geo['ypoint'])) {
         $current_geo['ypoint'] = 0;
     }
     if ($current_geo['xpoint'] > 0 || $current_geo['ypoint'] > 0) {
         if ($current_geo['address'] == "") {
             $url = "http://api.map.baidu.com/geocoder/v2/?ak=FANWE_MAP_KEY&location=FANWE_MAP_YPOINT,FANWE_MAP_XPOINT&output=json";
             $url = str_replace("FANWE_MAP_KEY", app_conf("BAIDU_MAP_APPKEY"), $url);
             $url = str_replace("FANWE_MAP_YPOINT", $current_geo['ypoint'], $url);
             $url = str_replace("FANWE_MAP_XPOINT", $current_geo['xpoint'], $url);
             require_once APP_ROOT_PATH . "system/utils/transport.php";
             $trans = new transport();
             $trans->use_curl = true;
             $request_data = $trans->request($url);
             $data = $request_data['body'];
             $data = json_decode($data, 1);
             $address = $data['result']['sematic_description'];
             if ($address) {
                 $current_geo['address'] = $address;
             } else {
                 es_session::delete("current_geo");
                 return null;
             }
         }
     }
     es_session::set("current_geo", $current_geo);
     return $current_geo;
 }
开发者ID:macall,项目名称:jsd,代码行数:46,代码来源:city.php

示例8: install

 public function install($config_seralized)
 {
     //uc数据的安装
     $post_config = unserialize($config_seralized);
     include_once APP_ROOT_PATH . 'system/utils/transport.php';
     $result = array('status' => 1, 'msg' => '');
     if (!file_exists(APP_ROOT_PATH . "uc_client/client.php") || !file_exists(APP_ROOT_PATH . "api/uc.php")) {
         $result['status'] = 0;
         $result['msg'] = '缺少 /uc_client/目录与/api/uc.php, 无法正常安装Ucenter整合';
         $GLOBALS['db']->query("update " . DB_PREFIX . "conf set value = '' where name = 'INTEGRATE_CODE'");
         $GLOBALS['db']->query("update " . DB_PREFIX . "conf set value = '' where name = 'INTEGRATE_CFG'");
         return $result;
     }
     $app_type = 'OTHER';
     $app_name = app_conf("SITE_NAME");
     $app_url = get_domain() . APP_ROOT;
     $app_charset = 'utf-8';
     $app_dbcharset = strtolower(str_replace('-', '', $app_charset));
     $ucapi = !empty($post_config['UCENTER_URL']) ? trim($post_config['UCENTER_URL']) : '';
     $ucip = !empty($post_config['UCENTER_IP']) ? trim($post_config['UCENTER_IP']) : '';
     $dns_error = false;
     if (!$ucip) {
         $temp = @parse_url($ucapi);
         $ucip = gethostbyname($temp['host']);
         if (ip2long($ucip) == -1 || ip2long($ucip) === FALSE) {
             $ucip = '';
             $dns_error = true;
         }
     }
     if ($dns_error) {
         $result['status'] = 0;
         $result['msg'] = 'DNS解析出错';
         $GLOBALS['db']->query("update " . DB_PREFIX . "conf set value = '' where name = 'INTEGRATE_CODE'");
         $GLOBALS['db']->query("update " . DB_PREFIX . "conf set value = '' where name = 'INTEGRATE_CFG'");
         return $result;
     }
     $ucfounderpw = trim($post_config['UCENTER_ADMIN']);
     $app_tagtemplates = '';
     if ($post_config['DB_CHARSET'] != 'utf-8') {
         $app_name = iconv('utf-8', $post_config['DB_CHARSET'], $app_name);
     }
     $postdata = "m=app&a=add&ucfounder=&ucfounderpw=" . urlencode($ucfounderpw) . "&apptype=" . urlencode($app_type) . "&appname=" . urlencode($app_name) . "&appurl=" . urlencode($app_url) . "&appip=&appcharset=" . $app_charset . '&appdbcharset=' . $app_dbcharset . '&apptagtemplates=' . $app_tagtemplates;
     $t = new transport();
     $ucconfig = $t->request($ucapi . '/index.php', $postdata);
     $ucconfig = $ucconfig['body'];
     if (empty($ucconfig)) {
         //ucenter 验证失败
         $result['status'] = 0;
         $result['msg'] = "Ucenter验证失败";
     } elseif ($ucconfig == '-1') {
         //管理员密码无效
         $result['status'] = 0;
         $result['msg'] = "管理员密码无效";
     } else {
         list($appauthkey, $appid) = explode('|', $ucconfig);
         if (empty($appauthkey) || empty($appid)) {
             //ucenter 安装数据错误
             $result['status'] = 0;
             $result['msg'] = '安装数据错误';
         } else {
             //开始写入public下的uc_config.php
             $ucconfig = explode("|", $ucconfig);
             //开始写入配置文件
             $key_name = array('UC_KEY', 'UC_APPID', 'UC_DBHOST', 'UC_DBNAME', 'UC_DBUSER', 'UC_DBPW', 'UC_DBCHARSET', 'UC_DBTABLEPRE', 'UC_CHARSET');
             $config_str = "<?php\n";
             foreach ($ucconfig as $k => $v) {
                 if ($k == 7) {
                     $v = "`" . $ucconfig[3] . "`." . $v;
                 }
                 $config_str .= "define('" . $key_name[$k] . "','" . $v . "');\n";
             }
             $uc_connect = $post_config['INTEGERATE_TYPE'] == 1 ? 'mysql' : '';
             $config_str .= "define('UC_CONNECT','" . $uc_connect . "');\n";
             $config_str .= "define('UC_DBCONNECT','0');\n";
             $config_str .= "define('UC_API','" . $ucapi . "');\n";
             $config_str .= "define('UC_IP','" . $ucip . "');\n";
             $config_str .= "\n ?>";
             @file_put_contents(APP_ROOT_PATH . "/public/uc_config.php", $config_str);
             //开始同步会员数据
             if ($uc_connect == 'mysql') {
                 $this->import_user();
             }
             if (file_exists(APP_ROOT_PATH . "/public/uc_config.php")) {
                 require_once APP_ROOT_PATH . "/public/uc_config.php";
                 $apps = uc_call("uc_app_ls");
                 $cachefile = APP_ROOT_PATH . 'public/uc_data/apps.php';
                 $fp = fopen($cachefile, 'w');
                 $s = "<?php\r\n";
                 $s .= '$_CACHE[\'apps\'] = ' . var_export($apps, TRUE) . ";\r\n";
                 fwrite($fp, $s);
                 fclose($fp);
             }
             $result['status'] = 1;
         }
     }
     if ($result['status'] == 0) {
         $GLOBALS['db']->query("update " . DB_PREFIX . "conf set value = '' where name = 'INTEGRATE_CODE'");
         $GLOBALS['db']->query("update " . DB_PREFIX . "conf set value = '' where name = 'INTEGRATE_CFG'");
     } else {
         $GLOBALS['db']->query("update " . DB_PREFIX . "conf set value = '' where name = 'INTEGRATE_CFG'");
//.........这里部分代码省略.........
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:101,代码来源:Ucenter_integrate.php

示例9: elseif

                write_static_cache('cloud_remind', $api_arr);
                make_json_result($api_arr['content']);
            } else {
                make_json_result('0');
            }
        } else {
            make_json_result('0');
        }
    } else {
        make_json_result($api_data['content']);
    }
} elseif ($act == 'close_remind') {
    $remind_id = $_REQUEST['remind_id'];
    $t = new transport('-1', 5);
    $apiget = "ver= {$data['version']} &ecs_lang= {$data['ecs_lang']} &charset= {$data['charset']} &certificate_id={$data['certificate_id']}&ent_id={$data['ent_id']}&remind_id={$remind_id}";
    $api_comment = $t->request('http://ecshop.ecmoban.com/cloud_remind.php', $apiget);
    $api_str = $api_comment["body"];
    $json = new Services_JSON();
    $api_arr = array();
    $api_arr = @$json->decode($api_str, 1);
    if (!empty($api_str)) {
        if (!empty($api_arr) && $api_arr['error'] == 0 && md5($api_arr['content']) == $api_arr['hash']) {
            $api_arr['content'] = urldecode($api_arr['content']);
            if ($data['charset'] != 'UTF-8') {
                $api_arr['content'] = ecs_iconv('UTF-8', $data['charset'], $api_arr['content']);
            }
            if (admin_priv('all', '', false)) {
                $apiget .= "&act=close_remind&ent_ac={$data['ent_ac']}";
                $result = $t->request('http://ecshop.ecmoban.com/cloud_remind.php', $apiget);
                foreach ($result as $key => $value) {
                    echo $key . '-------------' . urldecode($value) . '<br/>';
开发者ID:xiaoxiaowu007,项目名称:jicai,代码行数:31,代码来源:cloud.php

示例10: strtoupper

        $gcount = $goods['total'];
        $ecs_charset = strtoupper(EC_CHARSET);
        $ecs_user = $db->getOne('SELECT COUNT(*) FROM ' . $ecs->table('users'));
        $ecs_template = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = \'template\'');
        $style = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = \'stylename\'');
        if ($style == '') {
            $style = '0';
        }
        $ecs_style = $style;
        $shop_url = urlencode($ecs->url());
        $ip = real_ip();
        $type = 1;
        $patch_file = file_get_contents(ROOT_PATH . ADMIN_PATH . "/patch_num");
        $apiget = "ver= {$ecs_version} &name= {$ecs_product} &lang= {$ecs_lang} &release= {$ecs_release} &php_ver= {$php_ver} &mysql_ver= {$mysql_ver} &ocount= {$ocount} &oamount= {$oamount} &gcount= {$gcount} &charset= {$ecs_charset} &usecount= {$ecs_user} &template= {$ecs_template} &style= {$ecs_style} &url= {$shop_url} &ip= {$ip} &type= {$type} &patch= {$patch_file} ";
        $t = new transport();
        $api_comment = $t->request('http://api.shopne.com/census.php', $apiget);
        $api_str = $api_comment["body"];
        echo $api_str;
        $f = ROOT_PATH . 'data/config.php';
        file_put_contents($f, str_replace("'API_TIME', '" . API_TIME . "'", "'API_TIME', '" . date('Y-m-d H:i:s', time()) . "'", file_get_contents($f)));
        write_static_cache('api_str_68', $api_str);
    } else {
        echo $data;
    }
} elseif ($_REQUEST['act'] == 'first') {
    $smarty->assign('countries', get_regions());
    $smarty->assign('provinces', get_regions(1, 1));
    $smarty->assign('cities', get_regions(2, 2));
    $sql = 'SELECT value from ' . $ecs->table('shop_config') . " WHERE code='shop_name'";
    $shop_name = $db->getOne($sql);
    $smarty->assign('shop_name', $shop_name);
开发者ID:moonlight-wang,项目名称:feilun,代码行数:31,代码来源:index.php

示例11: setup_ucenter

 public function setup_ucenter()
 {
     require_once FANWE_ROOT . 'core/class/transport.class.php';
     $result = array('status' => 0, 'info' => '', 'data' => '');
     $app_type = 'OTHER';
     $app_name = 'FANWE';
     //fanweC('SHOP_NAME'); //$db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . " WHERE code = 'shop_name'");
     $app_url = 'http://' . $_SERVER['HTTP_HOST'] . __ROOT__;
     $app_charset = 'UTF-8';
     $app_dbcharset = strtolower(str_replace('-', '', 'UTF-8'));
     $ucapi = trim($_REQUEST['uc_url']);
     $ucfounderpw = trim($_REQUEST['uc_pass']);
     $postdata = "m=app&a=add&ucfounder=&ucfounderpw=" . urlencode($ucfounderpw) . "&apptype=" . urlencode($app_type) . "&appname=" . urlencode($app_name) . "&appurl=" . urlencode($app_url) . "&appip=&appcharset=" . $app_charset . '&appdbcharset=' . $app_dbcharset;
     $t = new transport();
     $ucconfig = $t->request($ucapi . '/index.php', $postdata);
     // dump($ucconfig);exit;
     $ucconfig = $ucconfig['body'];
     if (empty($ucconfig)) {
         //ucenter 验证失败
         $result['error'] = 1;
         $result['info'] = '验证失败:' . $ucapi . '/index.php?' . $postdata;
     } elseif ($ucconfig == '-1') {
         //管理员密码无效
         $result['error'] = 1;
         $result['info'] = '创始人密码错误';
     } else {
         list($appauthkey, $appid) = explode('|', $ucconfig);
         if (empty($appauthkey) || empty($appid)) {
             //ucenter 安装数据错误
             $result['error'] = 1;
             $result['info'] = '安装数据错误:' . $ucconfig;
         } else {
             $result['error'] = 0;
             $result['data'] = $ucconfig;
             $result['info'] = '服务器通信连接成功!';
         }
     }
     return $result;
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:39,代码来源:IntegrateAction.class.php

示例12: gethostbyname

     $ucip = gethostbyname($temp['host']);
     if (ip2long($ucip) == -1 || ip2long($ucip) === FALSE) {
         $ucip = '';
         $dns_error = true;
     }
 }
 if ($dns_error) {
     $result['error'] = 2;
     $result['message'] = '';
     die($json->encode($result));
 }
 $ucfounderpw = trim($_POST['ucfounderpw']);
 $app_tagtemplates = 'apptagtemplates[template]=' . urlencode('<a href="{url}" target="_blank">{goods_name}</a>') . '&' . 'apptagtemplates[fields][goods_name]=' . urlencode($_LANG['tagtemplates_goodsname']) . '&' . 'apptagtemplates[fields][uid]=' . urlencode($_LANG['tagtemplates_uid']) . '&' . 'apptagtemplates[fields][username]=' . urlencode($_LANG['tagtemplates_username']) . '&' . 'apptagtemplates[fields][dateline]=' . urlencode($_LANG['tagtemplates_dateline']) . '&' . 'apptagtemplates[fields][url]=' . urlencode($_LANG['tagtemplates_url']) . '&' . 'apptagtemplates[fields][image]=' . urlencode($_LANG['tagtemplates_image']) . '&' . 'apptagtemplates[fields][goods_price]=' . urlencode($_LANG['tagtemplates_price']);
 $postdata = "m=app&a=add&ucfounder=&ucfounderpw=" . urlencode($ucfounderpw) . "&apptype=" . urlencode($app_type) . "&appname=" . urlencode($app_name) . "&appurl=" . urlencode($app_url) . "&appip=&appcharset=" . $app_charset . '&appdbcharset=' . $app_dbcharset . '&apptagtemplates=' . $app_tagtemplates;
 $t = new transport();
 $ucconfig = $t->request($ucapi . '/index.php', $postdata);
 $ucconfig = $ucconfig['body'];
 if (empty($ucconfig)) {
     //ucenter 验证失败
     $result['error'] = 1;
     $result['message'] = $_LANG['uc_msg_verify_failur'];
 } elseif ($ucconfig == '-1') {
     //管理员密码无效
     $result['error'] = 1;
     $result['message'] = $_LANG['uc_msg_password_wrong'];
 } else {
     list($appauthkey, $appid) = explode('|', $ucconfig);
     if (empty($appauthkey) || empty($appid)) {
         //ucenter 安装数据错误
         $result['error'] = 1;
         $result['message'] = $_LANG['uc_msg_data_error'];
开发者ID:GYWang1983,项目名称:fruit,代码行数:31,代码来源:integrate.php

示例13: __construct

// +----------------------------------------------------------------------
// | o2o商业系统
// +----------------------------------------------------------------------
// | Copyright (c) 2010 http://www.vonwey.com All rights reserved.
// +----------------------------------------------------------------------
/* 模块的基本信息 */
if (isset($read_modules) && $read_modules == true) {
    $module['server_url'] = 'http://esm2.9wtd.com:9001';
    $module['class_name'] = 'ESM';
    /* 名称 */
    $module['name'] = "ESM短信平台";
    if (ACTION_NAME == "install" || ACTION_NAME == "edit") {
        require_once APP_ROOT_PATH . "system/sms/FW/transport.php";
        $tran = new transport();
        $install_info = $tran->request($module['server_url'] . "data/install.php");
        $install_info = json_decode($install_info['body'], 1);
        $module['lang'] = $install_info['lang'];
        $module['config'] = $install_info['config'];
    }
    return $module;
}
// ESM短信平台
require_once APP_ROOT_PATH . "system/libs/sms.php";
//引入接口
require_once APP_ROOT_PATH . "system/sms/FW/transport.php";
class ESM_sms implements sms
{
    public $sms;
    public $message = "";
    public function __construct($smsInfo = '')
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:30,代码来源:ESM_sms.php

示例14: COUNT

        $oamount = $order['stats']['oAmount'];
        $goods['total'] = $db->GetOne('SELECT COUNT(*) FROM ' . $ecs->table('goods') . ' WHERE is_delete = 0 AND is_alone_sale = 1 AND is_real = 1');
        $gcount = $goods['total'];
        $ecs_charset = strtoupper(EC_CHARSET);
        $ecs_user = $db->getOne('SELECT COUNT(*) FROM ' . $ecs->table('users'));
        $ecs_template = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = \'template\'');
        $style = $db->getOne('SELECT value FROM ' . $ecs->table('shop_config') . ' WHERE code = \'stylename\'');
        if ($style == '') {
            $style = '0';
        }
        $ecs_style = $style;
        $shop_url = urlencode($ecs->url());
        $patch_file = file_get_contents(ROOT_PATH . ADMIN_PATH . "/patch_num");
        $apiget = "ver= {$ecs_version} &lang= {$ecs_lang} &release= {$ecs_release} &php_ver= {$php_ver} &mysql_ver= {$mysql_ver} &ocount= {$ocount} &oamount= {$oamount} &gcount= {$gcount} &charset= {$ecs_charset} &usecount= {$ecs_user} &template= {$ecs_template} &style= {$ecs_style} &url= {$shop_url} &patch= {$patch_file} ";
        $t = new transport();
        $api_comment = $t->request('http://api..com/checkver.php', $apiget);
        $api_str = $api_comment["body"];
        echo $api_str;
        $f = ROOT_PATH . 'data/config.php';
        file_put_contents($f, str_replace("'API_TIME', '" . API_TIME . "'", "'API_TIME', '" . date('Y-m-d H:i:s', time()) . "'", file_get_contents($f)));
        write_static_cache('api_str', $api_str);
    } else {
        echo $data;
    }
} elseif ($_REQUEST['act'] == 'first') {
    $smarty->assign('countries', get_regions());
    $smarty->assign('provinces', get_regions(1, 1));
    $smarty->assign('cities', get_regions(2, 2));
    $sql = 'SELECT value from ' . $ecs->table('shop_config') . " WHERE code='shop_name'";
    $shop_name = $db->getOne($sql);
    $smarty->assign('shop_name', $shop_name);
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:index.php

示例15: elseif

                write_static_cache('cloud_remind', $api_arr);
                make_json_result($api_arr['content']);
            } else {
                make_json_result('0');
            }
        } else {
            make_json_result('0');
        }
    } else {
        make_json_result($api_data['content']);
    }
} elseif ($act == 'close_remind') {
    $remind_id = $_REQUEST['remind_id'];
    $t = new transport('-1', 5);
    $apiget = "ver= {$data['version']} &ecs_lang= {$data['ecs_lang']} &charset= {$data['charset']} &certificate_id={$data['certificate_id']}&ent_id={$data['ent_id']}&remind_id={$remind_id}";
    $api_comment = $t->request('http://cloud..com/cloud_remind.php', $apiget);
    $api_str = $api_comment["body"];
    $json = new Services_JSON();
    $api_arr = array();
    $api_arr = @$json->decode($api_str, 1);
    if (!empty($api_str)) {
        if (!empty($api_arr) && $api_arr['error'] == 0 && md5($api_arr['content']) == $api_arr['hash']) {
            $api_arr['content'] = urldecode($api_arr['content']);
            if ($data['charset'] != 'UTF-8') {
                $api_arr['content'] = ecs_iconv('UTF-8', $data['charset'], $api_arr['content']);
            }
            if (admin_priv('all', '', false)) {
                $apiget .= "&act=close_remind&ent_ac={$data['ent_ac']}";
                $result = $t->request('http://cloud..com/cloud_remind.php', $apiget);
                $api_str = $result["body"];
                //var_dump($api_str);
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:cloud.php


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