本帖最后由 bing15 于 2014-09-12 14:27:23 编辑

解决方案 »

  1.   

    你这个 url 能返回什么?
    直接浏览器,返回为空页面
    curl 自然也不会有返回https 是需要证书的
    如确认不需要证书,则需需要有 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    但也只能得到头
    HTTP/1.1 200 OK
    Content-Type: text/html; charset=gbk
    Cache-Control: no-cache, must-revalidate
    Content-Length: 0
      

  2.   


    在谷歌浏览器中是可以打,IE确实不行
    有一个问题,在我的app中去请求微信接口的时候,会报“请在微信客户端打开链接”
    我本身就是通过微信进去的啊,怎么还提示这个,下面是代码: $encodeUrl=urlencode('http://m.lbtest.imixun.com');
            $url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdb2a2367e10c1ba6&redirect_uri='.$encodeUrl.'&response_type=code&scope=snsapi_base&state=123#wechat_redirect';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    $content = curl_exec($ch);
    echo $content;
      

  3.   


    在谷歌浏览器中是可以打,IE确实不行
    有一个问题,在我的app中去请求微信接口的时候,会报“请在微信客户端打开链接”
    我本身就是通过微信进去的啊,怎么还提示这个,下面是代码: $encodeUrl=urlencode('http://m.lbtest.imixun.com');
            $url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxdb2a2367e10c1ba6&redirect_uri='.$encodeUrl.'&response_type=code&scope=snsapi_base&state=123#wechat_redirect';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, true);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    $content = curl_exec($ch);
    echo $content;
    得设置referer他是通过referer来检测的