获取 WHOIS“描述”来自 IP 地址的值并插入到 HTML 表中
我正在使用 SQL 查询从我的网站提取网络统计信息。 这是使用 MySQL 命令行工具完成的,并输出为 HTML 表。
该表当前的格式如下:
<TABLE>
<TR><TH>Keyword</TH><TH>Date</TH><TH>IP/WHOIS</TH></TR>
<TR><TD>random phrase</TD><TD>2010-10-11</TD><TD>1.2.3.4</TD></TR>
</TABLE>
然后使用 VBS 脚本对该表进行细化,并使用另一个 VBS 脚本将其邮寄给指定的收件人。
我想要做的是包含某种脚本,该脚本获取 IP 地址并进行 WHOIS 查找并返回“descr”字段中包含的值。该值可以放入与 IP 相同的单元格中,也可以放入全新的列中。该脚本应该能够通过连接到任务计划程序的“run.bat”文件执行。该脚本不一定必须是 VBS,但需要能够通过批处理文件运行。
I am using an SQL query to extract web statistics from my website.
This is done with the MySQL comand line tool and outputted as a HTML table.
The table is currently formatted like this:
<TABLE>
<TR><TH>Keyword</TH><TH>Date</TH><TH>IP/WHOIS</TH></TR>
<TR><TD>random phrase</TD><TD>2010-10-11</TD><TD>1.2.3.4</TD></TR>
</TABLE>
The table is then refined with a VBS script and mailed to specified recpients with another VBS script.
What I would like to do is include some sort of script that takes the IP address and makes a WHOIS lookup and returns the value contained in the "descr" field. The value could go into the same cell as the IP or a completely new column. The script should be able to execute via my "run.bat" file which is connected to the task scheduler. The script doesn't necessarily have to be VBS, but needs to be able to run via the batch file.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您在谈论什么编辑:请参阅下面的注释,它确实包含 DESCR 字段。descr
字段? WHOIS 不包含 DESCR 或描述字段(请参阅 http://whois.domaintools.com/microsoft.com ).有许多 VBS 脚本示例查询现成的 WHOIS 服务。如果您想使用其中一项公共 WHOIS 服务,请检查该服务是否符合商业用途。当您尝试查询域名注册管理机构本身时,这会变得更加困难,因为您需要查询不同的注册商以获得不同的 IP(例如,您不会在德国 (.de) 域名注册商的数据库 (www) 中找到冰岛 (.is) 域名.denic.de)。
尝试使用此 google 搜索来获取通过 VBS 查询 WHOIS 服务器的示例< /a>.
WhatEDIT: See comments below, it does contain a DESCR field.descr
field are you talking about? WHOIS does not contain a DESCR or desciption field (see e.g. http://whois.domaintools.com/microsoft.com).There are many examples of VBS scripts querying readily available WHOIS services. If you want to use one of these public WHOIS services check for compliance with business use of the said service. It will get a lot harder when you try to query domain registries themselves, because you need to query different registrars for different IPs (e.g. you will not find an Icelandic (.is) domain within the German (.de) domain registrar's database (www.denic.de).
Try this google search for examples of querying WHOIS servers via VBS.