zzr 发表于 2019-4-16 15:06:39

本帖最后由 ai0by 于 2019-4-16 15:19 编辑

新浪图床接口一枚:https://sbcoder.cn/api/sinaImg.html
你值得拥有
019.gif


加一个演示:https://api.0161.org/sinaimg/sinaImg.php?url=https://www.baidu.com/img/bd_logo1.png
ai0by 发表于 2019-4-16 15:17

新浪图床接口一枚:https://sbcoder.cn/api/sinaImg.html
你值得拥有
呵,虾米钓到鲤鱼了。

ai0by砍柴郎 发表于 2019-4-16 15:10:47


zzr 发表于 2019-4-16 15:04

大佬帮忙解密下index.js吧。。。。这种静态的基本都用了三方接口,[*]layui.use('element', function(){
[*]var element = layui.element;
[*]element.on('nav(demo)', function(elem){
[*]    //console.log(elem)
[*]    layer.msg(elem.text());
[*]});
[*]});
[*]$(document).ready(function() {
[*]      $('.picurl > input').bind('focus mouseover',
[*]                function() {
[*]                        if(this.value) {
[*]                              this.select()
[*]                        }
[*]                });
[*]      $("input").change(function(e) {
[*]                images_upload(this.files)
[*]      });
[*]      var obj = $('body');
[*]      obj.on('dragenter',
[*]                function(e) {
[*]                        e.stopPropagation();
[*]                        e.preventDefault()
[*]                });
[*]      obj.on('dragover',
[*]                function(e) {
[*]                        e.stopPropagation();
[*]                        e.preventDefault()
[*]                });
[*]      obj.on('drop',
[*]                function(e) {
[*]                        e.preventDefault();
[*]                        images_upload(e.originalEvent.dataTransfer.files)
[*]                })
[*]});
[*]
[*]function url_uploaddj() {
[*]layer.open({
[*]type: 1 //Page层类型
[*],area: ['500px', '300px']
[*],title: '在线上传'
[*],shade: 0.6 //遮罩透明度
[*],maxmin: true //允许全屏最小化
[*],anim: 0 //0-6的动画形式,-1不开启
[*],content: '上传'
[*]});
[*]};
[*]
[*]
[*]var url_upload = function() {
[*]      var urls = $("#urls").val();
[*]      var url_arr = urls.split("\n");
[*]      if(urls == "" || url_arr.length == 0) {
[*]                layer.msg('请贴入需要上传的网络图片地址.');
[*]                return
[*]      }else{
[*]                layer.closeAll();
[*]      }
[*]      $('.layui-row > button').innerHTML = '上传中';
[*]      for(var i = 0; ibutton').innerHTML = '成功 ' + (i + 1) + '/' + url_arr.length;
[*]                                        var apc = "
https://ww2.sinaimg.cn/large/" + data.pid + ".jpg
https://ww1.sinaimg.cn/large/" + data.pid + ".jpg
";
[*]                                        $('.preview').css('display', 'block');
[*]                                        $(".preview>hr").after(apc)
[*]                              } else {
[*]                                        $('.layui-row > button').innerHTML = '第' + (i + 1) + '张上传失败'
[*]                              }
[*]                              if(typeof data.pid != 'undefined') {
[*]                                        $('.layui-row > button').innerHTML = '上传成功'
[*]                              } else {
[*]                                        $('.layui-row > button').innerHTML = '上传失败';
[*]                                        $('#url-res-txt').append(data.error_msg + '\n');
[*]                                        alert(data.error_msg)
[*]                              }
[*]                        },
[*]                        error: function(XMLResponse) {
[*]                              alert("error:" + XMLResponse.responseText)
[*]                        }
[*]                })
[*]      }
[*]};
[*]
[*]
[*]var images_upload = function(files) {
[*]      var flag = 0;
[*]      $('textarea').empty();
[*]      $(files).each(function(key, value) {
[*]                $('.layui-row > button').innerHTML = '上传中';
[*]                image_form = new FormData();
[*]                image_form.append('file', value);
[*]                console.log(image_form);
[*]                $.ajax({
[*]                        url: 'https://api.oioweb.cn/sinaimg.php?type=multipart',
[*]                        //multipart本地图片上传
[*]                        type: 'POST',
[*]                        data: image_form,
[*]                        mimeType: 'multipart/form-data',
[*]                        contentType: false,
[*]                        cache: false,
[*]                        processData: false,
[*]                        dataType: 'json',
[*]                        success: function(data) {
[*]                              flag++;
[*]                              if(typeof data.pid != 'undefined') {
[*]                                        $('#url-res-txt').append('https://ww1.sinaimg.cn/large/' + data.pid + '.jpg\n');
[*]                                        $('.layui-row > button').innerHTML = '成功 ' + flag + '/' + files.length;
[*]                                        var apc = "
https://ww1.sinaimg.cn/large/" + data.pid + ".jpg
https://ww1.sinaimg.cn/large/" + data.pid + ".jpg
";
[*]                                        $('.preview').css('display', 'block');
[*]                                        $(".preview>hr").after(apc)
[*]                              } else {
[*]                                        $('.layui-row > button').innerHTML = '第' + flag + '张上传失败'
[*]                              }
[*]                              if(flag == $("input").files.length) {
[*]                                        if(typeof data.pid != 'undefined') {
[*]                                                $('.layui-row > button').innerHTML = '上传成功'
[*]                                        } else {
[*]                                                $('.layui-row > button').innerHTML = '上传失败';
[*]                                                $('#url-res-txt').append(data.error_msg + '\n');
[*]                                                alert(data.error_msg)
[*]                                        }
[*]                              }
[*]                        },
[*]                        error: function(XMLResponse) {
[*]                              alert("error:" + XMLResponse.responseText)
[*]                        }
[*]                })
[*]      })
[*]};
[*]document.onpaste = function(e) {
[*]      var data = e.clipboardData;
[*]      for(var i = 0; ia || i.xc || i.y = n.max / 2 && (i.x -= .03 * o, i.y -= .03 * m), t = (n.max - l) / n.max, r.beginPath(), r.lineWidth = t / 2, r.strokeStyle = "rgba(" + d.c + "," + (t + .2) + ")", r.moveTo(i.x, i.y), r.lineTo(n.x, n.y), r.stroke()))
[*]                        }),
[*]                        x(i)
[*]      }
[*]      var a, c, u, m = document.createElement("canvas"),
[*]                d = t(),
[*]                l = "c_n" + d.l,
[*]                r = m.getContext("2d"),
[*]                x = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
[*]                function(n) {
[*]                        window.setTimeout(n, 1e3 / 45)
[*]                },
[*]                w = Math.random,
[*]                y = {
[*]                        x: null,
[*]                        y: null,
[*]                        max: 2e4
[*]                };
[*]      m.id = l,
[*]                m.style.cssText = "position:fixed;top:0;left:0;z-index:" + d.z + ";opacity:" + d.o,
[*]                e("body").appendChild(m),
[*]                o(),
[*]                window.onresize = o,
[*]                window.onmousemove = function(n) {
[*]                        n = n || window.event,
[*]                              y.x = n.clientX,
[*]                              y.y = n.clientY
[*]                },
[*]                window.onmouseout = function() {
[*]                        y.x = null,
[*]                              y.y = null
[*]                };
[*]      for(var s = [], f = 0; d.n > f; f++) {
[*]                var h = w() * a,
[*]                        g = w() * c,
[*]                        v = 2 * w() - 1,
[*]                        p = 2 * w() - 1;
[*]                s.push({
[*]                        x: h,
[*]                        y: g,
[*]                        xa: v,
[*]                        ya: p,
[*]                        max: 6e3
[*]                })
[*]      }
[*]      u = s.concat(),
[*]                setTimeout(function() {
[*]                              i()
[*]                        },
[*]                        100)
[*]}();
[*]layer.msg('小提示:可以直接Ctrl+V粘贴上传喔~', function(){
[*]});复制代码

magickey 发表于 2019-4-16 15:11:51

这几天.已经陆陆续续有人反馈新浪对一些地区开始进行防盗了..今天已经把图片全部搞到本地备份,就等新浪失效了.替换成自己的图了~

trips 发表于 2019-4-16 15:06:00


magickey 发表于 2019-4-16 15:40


lol.gif
你这头像看着就欠打
lol.gif

zzr 发表于 2019-4-16 15:17:28

新浪图床不是快凉了吗,还用。。。
页: 1 [2]
查看完整版本: 新浪图床程序