• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vita_get_url_content函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vita_get_url_content函数的典型用法代码示例。如果您正苦于以下问题:PHP vita_get_url_content函数的具体用法?PHP vita_get_url_content怎么用?PHP vita_get_url_content使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: callOpenSystem

function callOpenSystem($paramArr, $local = false)
{
    $token = '12aead0936276c4d8bbe32947b9e94b3';
    //用户 token
    if ($local) {
        $url = C('OPEN_SYS_URL_LOCAL');
        //开放系统内网地址;默认值
    } else {
        $url = C('OPEN_SYS_URL');
        //开放系统外网地址
    }
    //生成签名
    $sign = createSign($paramArr, $token);
    //echo $sign,"<br/>";
    //组织参数
    $strParam = createStrParam($paramArr);
    $strParam .= 'sign=' . $sign;
    //echo $strParam,"<br/>";
    //构造Url
    $urls = $url . $strParam;
    //echo $urls;exit;
    //连接超时自动重试3次
    $cnt = 0;
    while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
        $cnt++;
    }
    return $result;
}
开发者ID:ohjack,项目名称:newErp,代码行数:28,代码来源:opensys_functions.php


示例2: callOpenSystem

function callOpenSystem($paramArr, $local = false)
{
    if ($local) {
        $url = C('OPEN_SYS_URL_LOCAL');
        //开放系统内网地址;默认值
    } else {
        $url = C('OPEN_SYS_URL');
        //开放系统外网地址
    }
    $token = C('OPEN_SYSTOKEN');
    //用户notice token
    $sign = createSign($paramArr, $token);
    //生成签名
    $strParam = createStrParam($paramArr);
    //组织参数
    $strParam .= 'sign=' . $sign;
    $urls = $url . $strParam;
    //构造Url
    $cnt = 0;
    //连接超时自动重试3次
    while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
        $cnt++;
    }
    return $result;
}
开发者ID:ohjack,项目名称:newErp,代码行数:25,代码来源:opensys_functions.php


示例3: act_setOpenApiParamArr

 public function act_setOpenApiParamArr($paramArr)
 {
     $url = 'http://gw.open.valsun.cn:88/router/rest?';
     //开放系统入口地址
     $paramArr = array('method' => 'trans.carrier.fix.get', 'format' => 'json', 'v' => '1.0', 'username' => 'valsun.cn', 'carrier' => $carrier, 'country' => $country, 'weight' => $weight, 'shaddr' => $shaddr);
     //生成签名
     $sign = createSign($paramArr, $token);
     //echo $sign,"<br/>";
     //组织参数
     $strParam = createStrParam($paramArr);
     $strParam .= 'sign=' . $sign;
     //echo $strParam,"<br/>";
     //构造Url
     $urls = $url . $strParam;
     //echo $urls,"<br/>";exit;
     //连接超时自动重试3次
     $cnt = 0;
     while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
         $cnt++;
     }
     //$result = file_get_contents($urls);
     //$jsondata_arr	= json_decode($result,true);
     echo "<pre>";
     print_r($result);
 }
开发者ID:ohjack,项目名称:newErp,代码行数:25,代码来源:openApiRequest.php


示例4: callOpenSystem

function callOpenSystem($paramArr, $url = '')
{
    //global $url,$token;
    if (empty($url)) {
        $url = C('OPEN_SYS_URL');
    } else {
        $url = C('OPEN_SYS_URL_LOCAL');
    }
    $token = C('OPEN_SYS_TOKEN');
    //用户token
    //生成签名
    $sign = createSign($paramArr, $token);
    //echo $sign,"<br/>";
    //组织参数
    $strParam = createStrParam($paramArr);
    $strParam .= 'sign=' . $sign;
    //echo $strParam,"<br/>";
    //构造Url
    $urls = $url . $strParam;
    // echo $urls."<br/>";
    //连接超时自动重试3次
    $cnt = 0;
    while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
        $cnt++;
    }
    return $result;
}
开发者ID:ohjack,项目名称:newErp,代码行数:27,代码来源:opensys_functions.php


示例5: callOpenSystem

function callOpenSystem($paramArr, $url = '', $cachetime = 0)
{
    global $memc_obj;
    $url = $url | C('OPEN_SYS_URL');
    //请求地址
    $token = C('OPEN_SYS_TOKEN');
    //用户token
    $strParam = array2http($paramArr) . "&sign=" . createSign($paramArr, $token);
    //生成签名,组织参数
    $urls = $url . $strParam;
    //构造Url
    $cachekey = "om_callOpenSystem_" . md5($urls);
    if ($cachetime > 0 && ($result = $memc_obj->get($cachekey))) {
        return $result;
    }
    //连接超时自动重试3次
    $cnt = 0;
    while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
        $cnt++;
    }
    if ($cachetime > 0) {
        $memc_obj->set($cachekey, $result, $cachetime);
    }
    return $result;
}
开发者ID:bizonix,项目名称:sailvan,代码行数:25,代码来源:opensys_functions.php


示例6: get_token

function get_token()
{
    $appid = "wx4b68b876134be056";
    $appsecret = "da463c9d5c3d81e895de576ca199e2ec";
    $token_url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={$appid}&secret={$appsecret}";
    $data = vita_get_url_content($token_url);
    $data = json_decode($data, true);
    //微信规定access_token有效时间为7200
    $access_token = empty($data['access_token']) ? '' : $data['access_token'];
    return $access_token;
}
开发者ID:kaka2007,项目名称:xplan,代码行数:11,代码来源:test_function.php


示例7: sendRequest

 public function sendRequest($parameter)
 {
     $sign = createSign($parameter);
     //生成签名
     $strParam = createStrParam($parameter);
     //组装参数
     $strParam .= 'sign=' . $sign;
     //构造Url
     $urls = $this->url . $strParam;
     $cnt = 0;
     while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
         $cnt++;
     }
     return $result;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:15,代码来源:requestOpenApi.model.php


示例8: getProductsCache

 /**
 取得老系统的eabay_products数据
 */
 public static function getProductsCache($method, $idc = '', $decode = true)
 {
     include_once WEB_PATH . "api/include/functions.php";
     if (empty($method)) {
         //参数不规范
         self::$errCode = 301;
         self::$errMsg = '参数信息不规范';
         return false;
     } else {
         $paramArr = array('format' => 'json', 'v' => '1.0', 'username' => 'valsun.cn');
         $paramArr['method'] = $method;
         //调用接口名称,系统级参数
         //生成签名
         $sign = createSign($paramArr, self::$token);
         //echo $sign,"<br/>";
         //组织参数
         $strParam = createStrParam($paramArr);
         $strParam .= 'sign=' . $sign;
         //echo $strParam,"<br/>";
         if ($idc == '') {
             $url = self::$url;
         } else {
             $url = 'http://gw.open.valsun.cn:88/router/rest?';
         }
         //构造Url
         $urls = $url . $strParam;
         //连接超时自动重试3次
         $cnt = 0;
         while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
             $cnt++;
         }
         if ($decode) {
             $data = json_decode($result, true);
         } else {
             $data = $result;
         }
         //var_dump($data);exit;
         if ($data) {
             self::$errCode = 200;
             self::$errMsg = 'Success';
             return $data;
         } else {
             self::$errCode = "000";
             self::$errMsg = "is empty!";
         }
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:50,代码来源:products.model.php


示例9: getTranNumFromErp

 /**
  * sendEbayCaseMailModel::getTranNumFromErp()
  * 从erp接口获取跟踪号
  * @param string $ebay_account ebay账号
  * @param string $ebay_userid 买家账号
  * @return  json string
  */
 public static function getTranNumFromErp($ebay_account, $ebay_userid)
 {
     include_once WEB_PATH . 'lib/opensys_functions.php';
     $paramList = array('method' => 'order.getOrderInfoByUserId', 'format' => 'json', 'v' => '1.0', 'username' => 'Message', 'type' => 'orderinfo', 'buyeraccount' => $ebay_account, 'selleraccount' => $ebay_userid);
     //生成签名
     $sign = createSign($paramList);
     //组织参数
     $strParam = createStrParam($paramList);
     $strParam .= 'sign=' . $sign;
     //构造Url
     $urls = $url . $strParam;
     $cnt = 0;
     while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
         $cnt++;
     }
     $data = json_decode($result, true);
     return $data;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:25,代码来源:sendEbayCaseMail.model.php


示例10: callOpenSystem

function callOpenSystem($paramArr)
{
    $url = C('OPEN_SYS_URL_LOCAL');
    //开放系统入口地址
    $token = C('OPEN_SYS_TOKEN');
    //用户notice token
    //生成签名
    $sign = createSign($paramArr, $token);
    //组织参数
    $strParam = createStrParam($paramArr);
    $strParam .= 'sign=' . $sign;
    //echo $strParam,"<br/>";
    //构造Url
    $urls = $url . $strParam;
    // 	echo $urls."<br/>";exit;
    //连接超时自动重试3次
    $cnt = 0;
    while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
        $cnt++;
    }
    return $result;
}
开发者ID:ohjack,项目名称:newErp,代码行数:22,代码来源:opensys_functions.php


示例11: callOpenSystem

function callOpenSystem($paramArr)
{
    $url = 'http://idc.gw.open.valsun.cn/router/rest?';
    //开放系统入口地址
    $token = '350dea37a2c2e3275f98de0f563c6760';
    //用户finejo token
    //$token = '5f5c4f8c005f09c567769e918fa5d2e3';
    //生成签名
    $sign = createSign($paramArr, $token);
    //组织参数
    $strParam = createStrParam($paramArr);
    $strParam .= 'sign=' . $sign;
    //构造Url
    $urls = $url . $strParam;
    //echo $urls;
    //连接超时自动重试3次
    $cnt = 0;
    while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
        $cnt++;
    }
    return $result;
}
开发者ID:ohjack,项目名称:newErp,代码行数:22,代码来源:opensys_functions.php


示例12: callOpenSystem

function callOpenSystem($paramArr, $url = '')
{
    //global $url,$token;
    $url = 'http://idc.gw.open.valsun.cn/router/rest?';
    //开放系统入口地址
    $token = '12aead0936276c4d8bbe32947b9e94b3';
    //用户 token
    //生成签名
    $sign = createSign($paramArr, $token);
    //echo $sign,"<br/>";
    //组织参数
    $strParam = createStrParam($paramArr);
    $strParam .= 'sign=' . $sign;
    //echo $strParam,"<br/>";
    //构造Url
    $urls = $url . $strParam;
    //echo $urls;exit;
    //连接超时自动重试3次
    $cnt = 0;
    while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
        $cnt++;
    }
    return $result;
}
开发者ID:ohjack,项目名称:newErp,代码行数:24,代码来源:opensys_functions.php


示例13: getArrayCount

function getArrayCount($methord, $rooturl, $session, $appKey, $appSecret, $fields, $extra)
{
    if ($extra != '') {
    } else {
        $extra = array();
    }
    //参数数组
    $param = array('timestamp' => date('Y-m-d H:i:s'), 'method' => $methord, 'session' => $session, 'format' => 'xml', 'app_key' => $appKey, 'v' => '2.0', 'sign_method' => 'md5', 'fields' => $fields);
    $paramArr = array_merge($param, $extra);
    //生成签名
    $sign = createSign($paramArr, $appSecret);
    //组织参数
    $strParam = createStrParam($paramArr);
    $strParam .= 'sign=' . $sign;
    //构造Url
    $url = $rooturl . $strParam;
    //连接超时自动重试
    $cnt = 0;
    while ($cnt < 3 && ($result = @vita_get_url_content($url)) === FALSE) {
        $cnt++;
    }
    //解析Xml数据
    $result = getXmlData($result);
    //获取错误信息
    $msg = $result['msg'];
    //返回结果
    $resultcount = $result['total_results'];
    $arr = array("msg" => $msg, "total_results" => $resultcount);
    return $arr;
}
开发者ID:Pengzw,项目名称:c3crm,代码行数:30,代码来源:Synfunction.php


示例14: act_getAllPicApi

 public function act_getAllPicApi()
 {
     require_once WEB_PATH . "html/api/include/opensys_functions.php";
     if (empty($spu)) {
         $spu = strlen(htmlentities($_REQUEST['spu'], ENT_QUOTES)) > 0 ? htmlentities($_REQUEST['spu'], ENT_QUOTES) : '';
     }
     if (empty($picType)) {
         $picType = strlen(htmlentities($_REQUEST['picType'], ENT_QUOTES)) > 0 ? htmlentities($_REQUEST['picType'], ENT_QUOTES) : '';
     }
     $errStr = '';
     if (empty($spu)) {
         $errStr .= '料号输入错误!<br />';
     }
     if (empty($picType)) {
         $errStr .= '站点输入错误!<br />';
     }
     if (!empty($errStr)) {
         self::$errCode = '001';
         self::$errMsg = $errStr;
         return false;
     }
     $token = "5f5c4f8c005f09c567769e918fa5d2e3";
     $url = 'http://idc.gw.open.valsun.cn/router/rest?';
     $paramArr = array('method' => 'datacenter.picture.getAllSizePic', 'format' => 'json', 'v' => '1.0', 'username' => 'datacenter', 'spu' => $spu, 'picType' => $picType);
     //生成签名
     $sign = createSign($paramArr, $token);
     //组织参数
     $strParam = createStrParam($paramArr);
     $strParam .= 'sign=' . $sign;
     //构造Url
     $urls = $url . $strParam;
     //echo $urls;
     //return $urls;
     $cnt = 0;
     while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
         $cnt++;
     }
     $data = json_decode($result, true);
     return $data;
 }
开发者ID:ohjack,项目名称:newErp,代码行数:40,代码来源:omAvailableApi.action.php


示例15: getOpenSysApi

 public static function getOpenSysApi($method, $paArr, $idc = '', $decode = true)
 {
     include_once WEB_PATH . "api/include/functions.php";
     if (empty($method) || empty($paArr) || !is_array($paArr)) {
         //参数不规范
         self::$errCode = 301;
         self::$errMsg = '参数信息不规范';
         return false;
     } else {
         $paramArr = array('format' => 'json', 'v' => '1.0', 'username' => 'valsun.cn');
         $paramArr['method'] = $method;
         //调用接口名称,系统级参数
         foreach ($paArr as $key => $value) {
             if (!is_array($value)) {
                 //如果传递的应用级参数不是数组的话,直接加入到paramArr中
                 $paramArr[$key] = $value;
             } else {
                 $paramArr['jsonArr'] = base64_encode(json_encode($value));
                 //对数组进行jsonencode再对其进行base64编码进行传递,否则直接传递数组会出错
             }
         }
         //生成签名
         $sign = createSign($paramArr, self::$token);
         //echo $sign,"<br/>";
         //组织参数
         $strParam = createStrParam($paramArr);
         $strParam .= 'sign=' . $sign;
         //echo $strParam,"<br/>";
         if ($idc == '') {
             $url = self::$url;
         } else {
             $url = 'http://gw.open.valsun.cn:88/router/rest?';
         }
         //构造Url
         $urls = $url . $strParam;
         // echo self::$token.'<br>';
         //echo $urls;
         //            exit;
         //连接超时自动重试3次
         $cnt = 0;
         while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
             $cnt++;
         }
         //print_r($result);
         //            exit;
         if ($decode) {
             $data = json_decode($result, true);
         } else {
             $data = $result;
         }
         // 			var_dump($data,$result,"++___+++");exit;
         if ($data) {
             self::$errCode = 200;
             self::$errMsg = 'Success';
             return $data;
         } else {
             self::$errCode = "000";
             self::$errMsg = "is empty!";
         }
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:61,代码来源:userCache.model.php


示例16: getOldAmazonOrderInfo

 function getOldAmazonOrderInfo($method, $paArr, $gateway = '')
 {
     require_once WEB_PATH . '/lib/opensys_functions.php';
     if (empty($method) || empty($paArr) || !is_array($paArr)) {
         //参数不规范
         return false;
     } else {
         $paramArr = array('format' => 'json', 'v' => '1.0', 'username' => 'Message');
         $paramArr['method'] = $method;
         //调用接口名称,系统级参数
         foreach ($paArr as $key => $value) {
             if (!is_array($value)) {
                 //如果传递的应用级参数不是数组的话,直接加入到paramArr中
                 $paramArr[$key] = $value;
             } else {
                 $paramArr['jsonArr'] = base64_encode(json_encode($value));
                 //对数组进行jsonencode再对其进行base64编码进行传递,否则直接传递数组会出错
             }
         }
         $sign = createSign($paramArr, OPENTOKEN);
         $strParam = createStrParam($paramArr);
         $strParam .= 'sign=' . $sign;
         $urls = OPENURL . $strParam;
         if (!empty($gateway)) {
             $urls = $gateway . $strParam;
         } else {
             $urls = OPENURL . $strParam;
         }
         $cnt = 0;
         while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
             $cnt++;
         }
         $data = json_decode($result, true);
         if ($data) {
             return $data;
         } else {
             return FALSE;
         }
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:40,代码来源:getAmazonOrder.action.php


示例17: error_reporting

<?php

error_reporting(-1);
include "../api/include/functions.php";
$url = 'http://gw.open.valsun.cn:88/router/rest?';
//开放系统入口地址
$carrier = '3';
$country = 'USA';
$weight = 0.5;
$shaddr = '中国深圳';
$paramArr = array('method' => 'trans.carrier.fix.get', 'format' => 'json', 'v' => '1.0', 'username' => 'valsun.cn', 'carrier' => $carrier, 'country' => $country, 'weight' => $weight, 'shaddr' => $shaddr);
//生成签名
$sign = createSign($paramArr, $token);
//echo $sign,"<br/>";
//组织参数
$strParam = createStrParam($paramArr);
$strParam .= 'sign=' . $sign;
//echo $strParam,"<br/>";
//构造Url
$urls = $url . $strParam;
//echo $urls,"<br/>";exit;
//连接超时自动重试3次
$cnt = 0;
while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
    $cnt++;
}
//$result = file_get_contents($urls);
//$jsondata_arr	= json_decode($result,true);
echo "<pre>";
print_r($result);
exit;
开发者ID:ohjack,项目名称:newErp,代码行数:31,代码来源:openApi.php


示例18: newData2ErpInterf

 public static function newData2ErpInterf($url)
 {
     if (self::$isSync == 'ZQT') {
         include_once "../api/include/functions.php";
         $url = 'http://erp.valsun.cn/api/' . $url;
         //$url = urlencode($url);
         $result = vita_get_url_content($url);
     }
 }
开发者ID:ohjack,项目名称:newErp,代码行数:9,代码来源:omAvailable.model.php


示例19: getArrayResult

function getArrayResult($methord, $rooturl, $session, $appKey, $appSecret, $fields, $col, $ch, $extra)
{
    if ($extra != '') {
    } else {
        $extra = array();
    }
    //参数数组
    $param = array('method' => $methord, 'session' => $session, 'timestamp' => date('Y-m-d H:i:s'), 'format' => 'xml', 'app_key' => $appKey, 'v' => '2.0', 'sign_method' => 'md5', 'fields' => $fields);
    $paramArr = array_merge($param, $extra);
    //生成签名
    $sign = createSign($paramArr, $appSecret);
    //组织参数
    $strParam = createStrParam($paramArr);
    $strParam .= 'sign=' . $sign;
    //构造Url
    $url = $rooturl . $strParam;
    //连接超时自动重试
    $cnt = 0;
    while ($cnt < 3 && ($result = @vita_get_url_content($url)) === FALSE) {
        $cnt++;
    }
    //解析Xml数据
    $result = getXmlData($result);
    //获取错误信息
    $sub_msg = $result['sub_msg'];
    //echo $sub_msg;
    //返回结果
    if ($ch == 's') {
        $taoresult = $result[$col . 's'][$col];
    } else {
        $taoresult = $result[$col];
    }
    return $taoresult;
}
开发者ID:honj51,项目名称:taobaocrm,代码行数:34,代码来源:Synfunction.php


示例20: callOpenSystem

function callOpenSystem($paramArr)
{
    global $memc_obj;
    $url = isset($paramArr['requesturl']) ? array_shift($paramArr) : C('OPEN_SYS_URL');
    $cachetime = isset($paramArr['cachetime']) ? array_shift($paramArr) : 0;
    $token = C('OPEN_SYS_TOKEN');
    //用户token
    $strParam = array2http($paramArr) . "&sign=" . createSign($paramArr, $token);
    //生成签名,组织参数
    $urls = $url . $strParam;
    //构造Url
    //  	echo $urls;exit;
    $cachekey = C('DB_PREFIX') . "callOpenSystem_" . md5($urls);
    if ($cachetime > 0 && ($result = $memc_obj->get($cachekey))) {
        return $result;
    }
    //连接超时自动重试3次
    $cnt = 0;
    if ($paramArr['getOrPost'] == '2') {
        //POST方式
        while ($cnt < 3 && ($result = @vita_get_url_content2($url . 'sign=' . createSign2($paramArr, $token), $paramArr)) === FALSE) {
            $cnt++;
        }
    } else {
        //GET方式
        while ($cnt < 3 && ($result = @vita_get_url_content($urls)) === FALSE) {
            $cnt++;
        }
    }
    if (strpos($result, "[") > 0 && strpos($result, "[") < strpos($result, "{")) {
        $result = substr($result, strpos($result, "["));
    } else {
        $result = substr($result, strpos($result, "{"));
    }
    $memc_obj->set($cachekey, $result, $cachetime);
    return $result;
}
开发者ID:bizonix,项目名称:sailvan,代码行数:37,代码来源:opensys_functions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vlang函数代码示例发布时间:2022-05-23
下一篇:
PHP visual_effect函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap