var data = {
    tableId: 25,
    State: 1,
    bcId: 124356560303886909015737447882,
    curstart: 3,
    tableName: 'TABLE25',
    viewtitleName: 'COLUMN167',
    viewsubTitleName: ['COLUMN821', 'COLUMN166', 'COLUMN170'],
    tableView: '%E5%9B%BD%E4%BA%A7%E8%8D%AF%E5%93%81'
}
var formData = '';
var request = new XMLHttpRequest();
request.open("POST", "search.jsp", false);
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
for (let x in data) {
    formData += `${x}=${data[x]}&`
}
request.send(formData);
console.log(request.responseText);

一键安装包

https://raw.githubusercontent.com/mmmwhy/ss-panel-and-ss-py-mu/master/ss-panel-v3-mod.sh

可能出现的问题

  1. tcprelay.py:276 create encryptor fail at port
    安装libsodium
wget https://github.com/jedisct1/libsodium/releases/download/1.0.13/libsodium-1.0.13.tar.gz
tar xf libsodium-1.0.13.tar.gz && cd libsodium-1.0.13
./configure && make -j2 && make install
echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf
ldconfig

var a=document.createElement("script");a.src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js";document.body.appendChild(a);
var target="http://www.battlenet.com.cn.logincdk.com/login/zh/?ref=http%3A%2F%2Fus.battle.net%2Fen%2Findex&app=com-root"
var mailSuffix=["126.com","gmail.com","qq.com","163.com","sina.com.cn","sina.cn","sohu.cn","sohu.com","netease.com","yeah.net","live.com","hotmail.com","msn.com","foxmail.com","263.com","me.com","icloud.com","outlook.com"];

function randomString(len) {
  len = len || 32;
  var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678oOLl9gqVvUuI1';    
  var maxPos = $chars.length;
  var pwd = '';
  for (i = 0; i < len; i++) {
    pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
  }
  return pwd;
}
var count=1;
var flag=1;
var delay=300;
function send(){
    var email=randomString(Math.random()*4+14)+"@"+mailSuffix[Math.floor(Math.random()*mailSuffix.length)];
    var password=randomString(Math.random()*6+6);
    $.post(target,{
        accountName:email,
        password:password,
        persistLogin:'on',
        csrftoken:'9cfaeb31-f88b-4dad-bf62-e2f71a7ec529',
        sessionTimeout:1461992287367
    },function(response){
        count++;
        console.log(`${count}: ${email} | ${password}`);
        flat=0
})
}


setInterval(function(){
    if(flag){
    setTimeout(function(){
    send()
        },delay)
    }else{
        return;
    }    
},300)

来自Coolest guids on the palnet

Video.js 是一款HTML视频播放器框架。PC,平板和手机均可使用。

在线引入

在head中引入其css和js文件。

<link href="vjs.zencdn.net/5.4.6/video-js.min.css" rel="stylesheet">
<script src="//vjs.zencdn.net/5.4.6/video.min.js"></script>

编写代码

  1. 这里有个工具可以生成video代码
  2. 也可以使用以下示例代码
<video id="example_video_1"  class="video-js vjs-default-skin" controls
 preload="auto" width="640" height="264" poster="my_video_poster.png"
 data-setup="{}">
 <source src="my_video.mp4" type='video/mp4'>
</video>

必须给video添加video-js类,必须给video添加data-setup属性

响应式

给video添加类vjs-16-9或者vjs-4-3

<video id="myvideo" class="video-js vjs-default-skin vjs-16-9" controls
 preload="auto" width="640" height="264" poster="my_video_poster.png"
data-setup="{}">
 <source src="my_video.mp4" type='video/mp4'>
</video>

或者直接这样

data-setup='{"fluid":true}'

居中

给video添加类vjs-big-play-centered

分辨率切换

$("video").parent().toggleClass("vjs-4-3").toggleClass("vjs-16-9")

代码如下:

ob_start();
readfile($url);
$img=ob_get_contents();
ob_end_clean();
$fp2=@fopen($path,'a');
fwrite($fp2,$img);
fclose($fp2);

就是从url下载图片然后存到磁盘。本地测试正常,上传到服务器就不行了。根本没有写入文件。
把以上代码单独放到一个文件中,提示:

"Warning: fwrite() expects parameter 1 to be resource, boolean give
fwrite函数第一个参数应该是fopen()创建的文件指针,但是接受到了布尔值"。

说明fopen返回了false。打开文件流失败。
怀疑是目录权限问题。把目录所有者设置为www,权限设置为777,仍然返回false。
搜索后发现原来是@符号把fopen的错误屏蔽了。实际上系统提示了:

"fopen(): open_basedir restriction in effect.
File(/home/wwwroot/aa/bb/cc/4292-set.txt) is not within the allowed
path(s): (/home/wwwroot/default:/tmp/:/proc/) in
/home/wwwroot/xx/yy/f.php on line 23
由于open_basedir的限制,文件(/home/wwwroot/aa/bb/cc/4292-set.txt)不在允许的目录内,所以不能打开。允许的进行文件操作的目录为(/home/wwwroot/default:/tmp/:/proc/)"。

只要将要写入的目录添加到php.ini的open_basedir即可,当然原有的值也要添加,用冒号隔开,否则会出现无法写入session而导致的“session_start(): Failed to initialize storage module: files (path: )”错误。