1. 程式人生 > >非微信瀏覽器如果跳轉到微信開啟?

非微信瀏覽器如果跳轉到微信開啟?

在這裡有一個程式碼大家可以參考一下

      
  $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/[email protected]!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;