【推荐】防盗图片获取代码

浏览:1226 发布日期:2015/09/11 分类:功能实现 关键字: 防盗图片
【推荐】防盗图片获取代码
 //----------------------------------------------------------
 //声明: 本代码并非完美,也许存在不佳之处,请放肆吐槽!
 //作者: 小曾
 //扣扣: 839024615
 //网址: www.yun8888.net
 //关于我的ThinkPHP http://www.thinkphp.cn/u/87696.html
 //----------------------------------------------------------

    
    //取防盗图片
    //请不要直接访问,可能显示乱码 <img src="{:('Img/img','url=http://xxxx')}" />
    public function img($url=''){
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
        curl_setopt($ch, CURLOPT_HEADER, 0);
        echo $out = curl_exec($ch);
    }
评论( 相关
后面还有条评论,点击查看>>