刷短信接口ip黑名单。持续更新。。

以下是恶意刷短信接口的黑名单(欢迎更多人士在评论区提供):

117.136.46.220
61.158.149.39
223.104.174.87
36.113.34.29
223.150.21.181
116.21.128.197
124.224.33.226
120.230.165.209
211.138.116.110
42.234.43.22
113.57.247.62
14.213.133.211
27.44.11.65
183.13.190.6
222.32.4.221
42.224.71.123
42.102.240.57
183.25.125.75
14.16.181.45
223.112.1.19
110.184.8.6
223.104.3.13
139.214.254.101
223.221.240.34
211.138.116.29
59.42.108.94
222.93.168.170
119.123.72.252
117.136.101.17
112.65.61.119
116.148.11.61
60.181.191.148
223.89.26.79
124.239.146.53
101.28.23.79
117.24.25.138
101.246.226.44
112.114.103.91
175.150.237.105
117.179.38.136
111.147.144.124
106.6.125.116
101.206.170.33

 

Nginx安装lua-nginx-module模块

 

原文地址

https://blog.csdn.net/qq_25551295/article/details/51744815

 

按上面地址基本可以配置成功,但是 lua-nginx-module v0.10.2.tar.gz 这个版本不能使用,改成了 v0.10.13.tar.gz 安装成功\

 

配合redis 使用,还需要安装 扩展

安装redis-lua ,只需要复制到对应的安装目录

git clone https://github.com/nrk/redis-lua

cp redis-lua/src/redis.lua /usr/local/luajit/share/lua

 

安装lua-socket2.0.2

wget http://luaforge.net/frs/download.php/2664/luasocket-2.0.2.tar.gz

tar zxvf luasocket-2.0.2.tar.gz

cd luasocket-2.0.2

vim config

LUAINC=-I/usr/local/luajit/lib
LUAINC=-I/usr/local/luajit/include/luajit-2.1

原文地址 https://blog.csdn.net/secretx/article/details/46534463

centos6.5 安装 python3.7.0

配置依赖先

yum groupinstall ‘Development Tools’

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel

yum install libffi-devel -y

去下载 wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz

解压

tar -xvf Python-3.7.0.tgz

cd Python-3.7.0

./configure –prefix=/usr/local/python3 –enable-optimizations

make && make install

 

建立软链接

ln -s /usr/local/python3/bin/python3 /usr/bin/

pyCharm最新2018激活码

修改hosts文件
将0.0.0.0 account.jetbrains.com添加到hosts文件最后,注意hosts文件无后缀,如果遇到无法修改或权限问题,可以采用覆盖的方法去替换hosts文件

修改后请检查hosts文件是否修改,激活码无法激活的原因99.99%是因为hosts没有修改正确

Windows系统hosts文件路径为:c:\windows\system32\drivers\etc
Mac和Ubantu(Linux)系统hosts文件路径为:/etc

 

复制激活码
打开PyCharm选择Activation code激活,然后复制下面的激活码点击激活。此激活码有效期为2019-05-04

K71U8DBPNE-eyJsaWNlbnNlSWQiOiJLNzFVOERCUE5FIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJXUyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUkMiLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkRCIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiUk0iLCJwYWlkVXBUbyI6IjIwMTktMDUtMDQifSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAxOS0wNS0wNCJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDE5LTA1LTA0In0seyJjb2RlIjoiR08iLCJwYWlkVXB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LgkNzuoog==

php curl 采集时发生错误 curl connect error

php 用curl作采集服务时,返回的数据为空,

抛出异常信息后显示 curl connect error,

经phpinfo比对后发现 可用的服务器 curl 是openssl ,不可用的curl 是nss

也可以使用curl -V命令来查看,发现里面是nss

所以需要把curl重新加入openssl编译

编译方法如下:

先去官方下载 https://curl.haxx.se/download/archeology/curl-7.19.7.tar.gz

tar -xvf curl-7.19.7.tar.gz

./configure – -prefix=/usr – -without-nss – -with-ssl

make && make install

ldconfig #重新载入配置文件的命令

curl -V

这样里面就会显示 openssl

重新启动php和apache服务后生效

Hadoop 分布式文件系统

hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量(high throughput)来访问应用程序的数据,适合那些有着超大数据集(large data set)的应用程序。HDFS放宽了(relax)POSIX的要求,可以以流的形式访问(streaming access)文件系统中的数据。

centos 安装CutyCapt

CutyCapt是一个截图工具 官方网站 http://cutycapt.sourceforge.net/ 我主要的目的是解决用php保存网页为图片,废话不多少开始安装CutyCapt

yum install epel-release
 
#依赖安装
yum install Xvfb
yum install xorg-x11-fonts*
yum install qtwebkit-devel qt-devel
#中文字体
yum install fonts-chinese

yum install CutyCapt
#测试使用
xvfb-run --server-args="-screen 0, 1920x1080x24" CutyCapt --url=http://www.phpsong.com --out=phpsong.jpg

如果提示错误libEGL warning: DRI2: failed to open swrast (search paths /usr/lib64/dri)
解决方法

yum install mesa-dri-drivers

问题
1)截图时候有乱码
2) 执行速度慢
3)截取百度和小松博客,发现按钮上的文字没有显示,应该也是乱码导致的

 

PS.中文乱码问题
将windows下的中文字体上传至/usr/share/fonts目录,执行下命令fc-cache即可

测试截图

xvfb-run --server-args="-screen 0, 1920x1080x24" CutyCapt --url=http://www.phpsong.com --out=1.jpg
xvfb-run --server-args="-screen 0, 1920x1080x24" CutyCapt --url=http://www.baidu.com --out=2.jpg
xvfb-run --server-args="-screen 0, 1920x1080x24" CutyCapt --url=http://www.163.com --out=3.jpg
xvfb-run --server-args="-screen 0, 1920x1080x24" CutyCapt --url=http://www.sina.com.cn --out=4.jpg

PHP识别二维码的方法(php-zbarcode安装与使用)

说明:扩展需要依赖ImageMagick和zbar,安装前先安装这两个软件

yum install libgnomeui-devel

 

说明:扩展需要依赖ImageMagick和zbar,安装前先安装这两个软件

1.安装ImageMagick(http://www.imagemagick.org/)

1
yum install ImageMagick.x86_64 ImageMagick-devel.x86_64

2.安装zbar(http://sourceforge.net/projects/zbar/?source=directory)

1
2
3
4
5
6
7
8
9
10
11
12
wget http://jaist.dl.sourceforge.net/project/zbar/zbar/0.10/zbar-0.10.tar.bz2
tar jxvf zbar-0.10.tar.bz2
cd zbar-0.10
#注意此步有大坑,要禁止gtk,python和qt的支持,不然你就等着无限报错吧
./configure --without-gtk --without-python --without-qt --prefix=/usr/local/zbar
make && make install
#提示如下为完成,不是报错
#make[2]: Leaving directory `/root/zbar-0.10'
#make[1]: Leaving directory `/root/zbar-0.10'
#echo “/usr/local/zbar/lib/” >> /etc/ld.so.conf
 ldconfig
 ln -s /usr/local/zbar/lib/pkgconfig/zbar.pc /usr/lib64/pkgconfig/zbar.pc

3.安装php-zbarcode(https://github.com/mkoppanen/php-zbarcode)

1
2
3
4
5
6
7
8
9
unzip php-zbarcode-master.zip
cd php-zbarcode-master
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
#提示如下完成
#Build complete.
#Don't forget to run 'make test'.
#Installing shared extensions:   /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/

4.添加:extension=zbarcode.so 到php.ini配置文件

此时查看phpinfo();后搜索zbarcode后为完成

5.测试效果

图片取自https://en.wikipedia.org/wiki/File:Ean-13-5901234123457.png

另外,用户还可以使用本站二维码生成工具来生成二维码图片进行测试:
http://tools.jb51.net/transcoding/jb51qrcode

测试代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
  //新建一个图像对象
  $image = new ZBarCodeImage("./test.png");
  // 创建一个二维码识别器
  $scanner = new ZBarCodeScanner();
  //识别图像
  $barcode = $scanner->scan($image);
  //循环输出二维码信息
  if (!empty($barcode)) {
    foreach ($barcode as $code) {
      printf("Found type %s barcode with data %s\n", $code['type'], $code['data']);
    }
  }
?>