非微信浏览器如果跳转到微信打开?

更新时间:2018-12-25 11:31:44

在这里有一个代码大家可以参考一下

        $is_proxy_ip = '116.237.67.127:54194';
        $curl = curl_init();
        if($is_proxy_ip){
            curl_setopt ($curl, CURLOPT_PROXY, $proxy_ip);
            curl_setopt($curl, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:'.$ip, 'CLIENT-IP:'.$proxy_ip ));  //构造IP
        }

        curl_setopt_array($curl, array(
          CURLOPT_URL => "https://ssh.XXXX.com/11b921/m@1474!9.js",
          CURLOPT_RETURNTRANSFER => true,
          CURLOPT_ENCODING => "",
          CURLOPT_SSL_VERIFYPEER => FALSE,
          CURLOPT_SSL_VERIFYHOST => FALSE,
          CURLOPT_MAXREDIRS => 10,
          CURLOPT_TIMEOUT => 30,
          CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
          CURLOPT_CUSTOMREQUEST => "POST",
          CURLOPT_POSTFIELDS => "{\"goodsId\":\"$goodsId\",\"pid\":\"null\",\"duoduoType\":\"2\",\"launchWx\":\"1\",\"type\":2,\"url\":\"$url\"}",
          CURLOPT_HTTPHEADER => array(
            "accept: */*",
            "accept-encoding: br, gzip, deflate",
            "accept-language: zh-cn",
            "cache-control: no-cache",
            "content-type: application/json;charset=UTF-8",
            "cookie: api_uid=rBUGYVtgSxEjbGlrbnzUAg==",
            "dingtalk-flag: 1",
            "Referer:http://www.XXXX.cn:9918"
          ),
        ));

        $response = curl_exec($curl);
        $err = curl_error($curl);
        curl_close($curl);
        echo $response;


<<< 返回更多动态