Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Konami_Plugin' does not have a method 'header' in /www/wwwroot/www.lijian.net/var/Typecho/Plugin.php on line 446

Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'LaAnalysis_Plugin' not found in /www/wwwroot/www.lijian.net/var/Typecho/Plugin.php on line 446

小A 发布的文章

捡了一台ipv6的小鸡玩,真不如ipv4方便

   EU.ORG的免费域名大家都知道是免费域名里最好的,随着FREENOM的塌房和EU.ORG的创始人皮埃尔·贝萨克(Pierre Beyssac)年龄越来越大,审批时间越来越长,现在EU.ORG的免费域名也开始交易起来。这里就介绍下EU.ORG的域名过户(PUSH)。

   在EU.ORG注册成功会得到一个账号,XXXXXX-FREE,这里卖家叫A00001-FREE(A账号),买家叫B00001-FREE(B账号)。

- 阅读剩余部分 -

    自从顶级免费域名freenom没有以后,现在已经没有可以一直使用的顶级免费域名了,就算有也是提供第一年免费,之前在freenom已pending状态的域名可以选择发送邮件到info@freenom.com说明情况后可以改为收费状态并已付费10年。

    以下整理了一些可以用的免费二级域名:

https://nic.eu.org 可以申请到eu.org的免费二级域名,需要审核,但是审核就比较随缘了,稳定性高,从1996年一直提供免费域名,可以使用CF解析
https://nic.ua 可以申请到pp.ua的免费二级域名,需要绑定信用卡才能申请,无法隐藏whios信息,稳定性高,可以使用CF解析
https://freedns.afraid.org 可以申请到mooo.com/688.org/us.to等很多免费二级域名,不可使用CF解析,其中mooo.com/688.org已被污染,建议找未污染后缀
https://freedomain.one 可以申请到work.gd/run.place等免费二级域名
https://www.cloudns.net 可以申请到cloudns.**等免费二级域名,现在不可使用CF解析了
https://www.sitelutions.com 可以申请到rr.nu等免费二级域名,不可使用CF解析,不提供免费解析
https://now.cc 可以申请到now.cc免费二级域名,香港,现在暂停注册,等待开放
https://secure.nom.za 可以申请到nom.za免费二级域名,需审核审,可以使用CF解析
https://www.azote.org 可以申请到fr.nf等免费二级域名,限IP申请,不可以使用CF解析
https://www.3domains.net 可以申请到coms.hk/nets.hk/orgs.hk等免费二级域名,需要香港IP才能申请到,不可以使用CF解析
https://www.site.ac 可以申请到3d.tc/app.tc等免费二级域名,不可以使用CF解析,不提供解析
https://www.venez.fr 可以申请到fr.ht/ze.tc免费二级域名,限IP申请,不可以使用CF解析
https://www.noip.com 可以申请到ddns.net/ddns.me免费二级域名,只能注注册一个,不可以使用CF解析
https://www.l53.net 可以申请到ggff.net二级域名,选1年收费,使用优惠码workersday可免费,不可以使用CF解析(20230508更新)

以上信息会不定期整理修改!

使用curl库能很好的实现文件下载,而且curl库也能直接支持https(编译的时候带好openssl),下面是具体的实现文件下载的过程:

首页,需要定义一个下载任务的结构:

typedef struct _tagDownTask
{
    char url[1024];
    char filePath[1024];
    unsigned long totalSize;
    unsigned long currentFileSize;
    unsigned long limitSize; //0为不限制
    FILE* pfile;        //文件句柄
    unsigned long fileSize;
    char checkSum[64];  //md5效验码
}DownTask;

- 阅读剩余部分 -

碰到一个奇怪的问题,通过localtime生成本地日期时间打日志,结果日志会出现非北京时间,好奇去查了一个,结果发现此函数是非线程安全函数,原来代码如下:

int32_t utc2datetime(uint32_t utctime, SVC_TIME* out_pTime)
{
	time_t rawtime;
	struct tm * p;
	rawtime = utctime;
	p = localtime(&rawtime);
	out_pTime->unYear = (uint32_t)(1900 + p->tm_year);
	out_pTime->unMonth = (uint16_t)(1 + p->tm_mon);
	out_pTime->unDay = (uint16_t)p->tm_mday;
	out_pTime->unHour = (uint16_t)p->tm_hour;
	out_pTime->unMinute = (uint16_t)p->tm_min;
	out_pTime->unSecond = (uint16_t)p->tm_sec;
	out_pTime->unWeek = (uint16_t)p->tm_wday;
	return 0;
}

localtime,用来获取系统时间,原型在time.h头文件中,定义如下:

struct tm *localtime(const time_t *timep);

- 阅读剩余部分 -

浏览器定位是可以使用javascript直接获取当前你的网络所在的位置信息,主要方法为

navigator.geolocation.getCurrentPosition(function(position){});

其中`position`信息中包括以下内容:

经度 : position.coords.longitude

纬度 : position.coords.latitude

精度 : position.coords.accuracy

高程 : position.coords.altitude

高程精度 : position.coords.altitudeAcuracy

方向 : position.coords.heading

速度 : position.coords.speed

时间戳 : position.timestamp

- 阅读剩余部分 -

使用ThinkPHP6开发接口时会遇到前置过滤或判断,我们可以使用中间件功能。以下是单应用模式示例:

创建中间件

第1种方式,命令行方式:

php think make:middleware Filter

 第2种方式,手动在`app`目录下创建`middleware`文件夹,再创建中间件类:

<?php

namespace app\middleware;

class Filter
{
    public function handle($request, \Closure $next, $name)
    {
        //to do

        return $next($request);
    }
}

- 阅读剩余部分 -