编译安装最新版本的bind:
wget -O bind-9-12.tar.gz 'https://www.isc.org/downloads/file/bind-9-12-0/?version=tar-gz'
tar zxvf bind-9-12.tar.gz
cd bind-9.12.0/
./configure --without-openssl
make
测试:
./bin/dig/dig @8.8.8.8 google.com +subnet=116.206.101.0/24
发布时间:March 13, 2018 // 分类: // No Comments
编译安装最新版本的bind:
wget -O bind-9-12.tar.gz 'https://www.isc.org/downloads/file/bind-9-12-0/?version=tar-gz'
tar zxvf bind-9-12.tar.gz
cd bind-9.12.0/
./configure --without-openssl
make
测试:
./bin/dig/dig @8.8.8.8 google.com +subnet=116.206.101.0/24
发布时间:March 13, 2018 // 分类: // No Comments
非原生IP使用8.8.8.8公共dns因为EDNS(公共服务器向权威服务器解析时会转发客户端IP,然后权威服务器根据客户端的IP返回相应结果),可能会被解析到ip所在国家,使用其它公共dns,
香港:
nameserver 203.80.96.10
nameserver 202.45.84.58
美国:
nameserver 9.9.9.9
nameserver 74.82.42.42
发布时间:February 20, 2018 // 分类: // No Comments
<?php
ini_set('date.timezone','Asia/Shanghai');
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
$mail = new PHPMailer();
$mail->SMTPDebug = 1;
$mail->isSMTP();
$mail->SMTPAuth=true;
$mail->Host = 'smtp.qq.com';
$mail->SMTPSecure = 'ssl';
$mail->Port = 465;
$mail->Helo = 'Hello smtp.qq.com Server';
$mail->Hostname = 'haiyun.me';
$mail->CharSet = 'UTF-8';
$mail->Username ='admin@haiyun.me';
$mail->Password = 'password';
$mail->FromName = 'fromuser';
$mail->From = 'admin@haiyun.me';
$mail->isHTML(true);
$mail->addAddress('touser@haiyun.me','touser');
$mail->Subject = "这是标题";
$mail->Body = "这是内容";
$status = $mail->send();
if($status) {
echo '发送邮件成功'."\n";
}else{
echo '发送邮件失败,错误信息:'.$mail->ErrorInfo."\n";
}
发布时间:February 20, 2018 // 分类: // No Comments
用php curl写个程序采集Https网站长时间运行后内存占用很大,使用memory_get_usage()查看内存不变,用ps或top查看占用内存持续增长,经分析是php curl的问题,禁用php curl ssl校验即可:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);