当前位置: 首页 > wzjs >正文

做网站需要学jsp广告推销

做网站需要学jsp,广告推销,如何做网签合同 网站,公司策划是做什么的前阵子发现一直想注册但被别人注册了的一个域名快要过期了,就想着写个脚本跑在电脑上,每分钟检查一次域名状态,一旦域名被正式删除,就发封邮件通知我,这样就不用频繁手动检查域名状态了。 写脚本时发现一个有趣的现象…

前阵子发现一直想注册但被别人注册了的一个域名快要过期了,就想着写个脚本跑在电脑上,每分钟检查一次域名状态,一旦域名被正式删除,就发封邮件通知我,这样就不用频繁手动检查域名状态了。

写脚本时发现一个有趣的现象,使用whois命令查询域名状态时,它给我返回了两组信息,而且这两组信息的域名状态竟然是不一致的,让人非常好奇,所以特意了解了一下whois的机制,记录在这里。

$ whois $DOMAIN | grep "Domain Status"Domain Status: pendingDelete https://icann.org/epp#redemptionPeriod
Domain Status: pendingDelete https://icann.org/epp#ok

在whois返回的两组信息中,第一组来自注册局(Registry,如VeriSign),第二组来自注册商(Registrar,如阿里云),注册商通常拥有比注册局更加详细的域名信息。whois会执行递归查询:首先从注册局查询域名信息,注册局返回的信息中包含注册商的whois服务器,然后再向注册商查询域名信息。调用whois命令时加上--verbose参数可以观察到这个过程:

$ whois $DOMAIN --verbose | grep -E "Using server|Registrar WHOIS Server"
Using server whois.verisign-grs.com.Registrar WHOIS Server: whois.paycenter.com.cn
Using server whois.paycenter.com.cn.
Registrar WHOIS Server: whois.paycenter.com.cn

那么问题来了:注册商whois服务器是从注册局查询得来的,那注册局whois服务器是从哪里来的呢?答案是硬编码。whois命令源码中包含一个tld_serv_list文件,里面包含各顶级域名的注册局whois服务器,以下是该文件的节选:

...
.com	VERISIGN whois.verisign-grs.com.za.net	whois.za.net
.net	VERISIGN whois.verisign-grs.com.eu.org	whois.eu.org
.za.org	whois.za.org
.org	whois.pir.org.edu	whois.educause.edu
.gov	whois.dotgov.gov
.int	whois.iana.org
.mil	NONE
...

既然whois信息保存在不止一个地方,那么由于数据同步的延迟,有时信息不一致也就不足为奇了,那到底该以哪边为准呢?就域名状态而言,应当以注册局的信息为准,https://lookup.icann.org/en/faq里面提供了各字段的数据源,以下是摘录:

Result LabelDescriptionSource
Domain Information
NameThe name of the domain name which was entered into the lookup tool.Registry
Internationalized Domain NameThe non-ASCII character name of the domain name which was entered into the lookup tool, if applicable.Registry
Registry Domain IDRegistry-unique identifier for a domain name.Registry
Domain StatusThe status of a domain name registration. Every domain has at least one status code, but they can also have more than one status code. See EPP Status Codes for more info.Registry
NameserversInformation regarding the domain name’s DNS nameservers. To include nameserver unicode name and IP addresses, where applicable.Registry
Dates
DatesMultiple dates may be displayed in the “Dates” section and can include the date when the domain name registration was created, expires, and updated, as applicable.Registry/Registrar
Contact Information
Registrant, Administrative, Technical, and Billing Contact InformationThe contact information of the registrant, administrative, technical, and billing contacts will appear in this section, where applicable.Registrar
Registrar Information
NameThe name of the registrar sponsoring the domain name’s registration.Registrar
IANA IDThe registrar’s IANA ID from the IANA’s Registrar ID registry (https://www.iana.org/assignments/registrar-ids/registrar-ids.xhtml)Registry
Abuse contact emailThe abuse contact email address of the registrar.Registrar
Abuse contact phoneThe abuse contact telephone number of the registrar.Registrar

我关心的是域名状态这个信息,为了防止从注册商那里获取到过时的数据,可以使用-h选项指定只从注册局获取数据:

$ whois $DOMAIN -h whois.verisign-grs.com --verbose | grep -E "Using server|Domain Status"
Using server whois.verisign-grs.com.Domain Status: ok https://icann.org/epp#redemptionPeriod

后来又改用js,在js中使用whois模块时也有类似的问题,需要指定server参数和follow参数来防止对注册商服务器进行查询:

whois.lookup(domain, { server: "whois.verisign-grs.com", follow: 0 }, (err, data) => {if (err) return reject(err);let statusLines = data.split("\n").filter(line => /Domain Status/i.test(line)).map(line => {const match = line.match(/Domain Status:\s+(\w+)/i);return match ? match[1] : "";}).sort().join("\n");if (statusLines === "") {statusLines = "(empty)";}resolve(statusLines);
});

不过最终的结局是仍然没能注册上这个域名,今天早上醒来,发现域名已经被人注册了,域名状态在半夜两点多发生了变化,从pendingDelete状态直接变更为了ok。这个域名就是我名字的全拼,有9个字母,不知道有啥稀罕的┑( ̄Д  ̄)┍

http://www.dtcms.com/wzjs/384175.html

相关文章:

  • 网站维护 北京软文范文200字
  • 大理建网站百度seo关键词优化方案
  • 民和县公司网站建设b站免费版入口
  • 网站开发兼职接单平台营销渠道策划方案
  • 上海建筑公司排名外贸网站建设优化
  • 兼容性视图中显示所有网站磁力宝
  • 网站排名易下拉技术seo是什么意思蜘蛛屯
  • 在线收录郑州网站运营专业乐云seo
  • 婚庆公司网站建设线上营销培训
  • dreamwearver可以做网站吗培训心得体会总结
  • 内蒙能源建设集团网站网络广告营销策略
  • 平面设计素材网站知乎泰州seo
  • 建站公司最新价格企业整站seo
  • win7系统做asp网站哪里有网站推广优化
  • 网站admin密码今日最火的新闻
  • 企业网站推广属于付费推广吗服务器ip域名解析
  • 小说网站防盗做的最好的是小程序开发软件
  • 请简述网站建设的一般流程谷歌浏览器引擎入口
  • 如何把字体导入wordpressseo+网站排名
  • 福田做商城网站建设哪家公司靠谱免费发布广告信息网
  • 网站建设费用是多少钱怎样做一个产品营销方案
  • 免费建立网站论坛青岛seo博客
  • 衡水专业网站制作微信朋友圈广告投放价格表
  • 中小学做课题研究的网站新媒体运营怎么自学
  • 网站建设与管理 教材网站搭建免费
  • 网站构造百度智能建站平台
  • 广告网站建设及推广百度竞价推广方案范文
  • 网站建设最新签约下载app到手机上并安装
  • 政府网站集约化建设情况报告看广告收益的正规平台
  • asp服装商城网站源码高端品牌网站建设