admin 发布的文章

PHP查询域名是否可注册,判断DNS是否存在

比较简单的判断方式,直接查询域名是否存在dns……

if(IS_POST){
    $sld=I('sld');
    $tld=I('tld');
    $domain=$sld.$tld;
    $response = @dns_get_record($domain, DNS_ALL);

    if(empty($response)){
        echo "<H2 style='color:green;' >Domain $name_domain is available.</H2>";
    }else{
        echo "<H2 style='color:red;'>Domain $name_domain has taken.</H2>";
    }
}

DirectAdmin中创建Let's Encrypt免费SSL证书错误

我尝试在DirectAdmin中创建Let's Encrypt免费SSL证书时出错。返回如下:

Cannot Execute Your Request

Details

Getting challenge for parniagroup.com from acme-server...
User let's encrypt key has been found, but not registered. Registering...
Account registration error. Response: HTTP/1.1 100 Continue 
Expires: Wed, 03 Aug 2016 08:08:26 GMT 
Cache-Control: max-age=0, no-cache, no-store 
Pragma: no-cache 

HTTP/1.1 400 Bad Request 
Server: nginx 
Content-Type: application/problem+json 
Content-Length: 265 
Boulder-Request-Id: vdS0ublv2yTS3g8BkAW4mjM9f-HCiYV6DgYrfCkaLqI 
Replay-Nonce: QUnGB2x_ZY1sJRrGG3MgS9fwtegzDawR8xj1uJ4E50o 
Expires: Wed, 03 Aug 2016 08:08:27 GMT 
Cache-Control: max-age=0, no-cache, no-store 
Pragma: no-cache 
Date: Wed, 03 Aug 2016 08:08:27 GMT 
Connection: close 

{
"type": "urn:acme:error:malformed",
"detail": "Provided agreement URL [https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf] does not match current agreement URL [https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf]",
"status": 400
}.

- 阅读剩余部分 -

PHP查询指定日期内的内容

if(IS_POST){
    $rqstart = I('rqstart');
    $rqend = I('rqend');
    $begintime = strtotime($rqstart. ' 00:00:00');
    $endtime = strtotime($rqend. ' 23:59:59');

    //日期范围内查询条件
    $map['billing_time'] = array(array('EGT', $begintime), array('ELT', $endtime));

    $alipay    = $Billing->where($map)->where(array('billing_pay_manner'=>'alipay'))->sum('billing_price');
    $weixinpay = $Billing->where($map)->where(array('billing_pay_manner'=>'weixinpay'))->sum('billing_price');

    //组装数据
    if($weixinpay>0 or $alipay>0){
        $data=array("alipay"=>"$alipay","weixinpay"=>"$weixinpay");
        $this->ajaxReturn($data);
    }else{
        $data="-1";
        $this->ajaxReturn($data);
    }
}

有时候太善良并不会有好的结果

我人比较好,生活中或者生意中,但有时候会遇到很多比较坏的人,让我一下子反感自己好这个性格。

记得以前刚刚卖主机,那会儿产品还只有虚拟主机,很多人玩儿独立博客,起初只是因为自己空间不稳定很不爽,想搞个便宜、稳定的几个朋友一起用顺道赚个烟钱这样,后面就越来越多人了,当然这是后话。

- 阅读剩余部分 -