如何将谁的结果存储到 MySQL


How do I store whois result to MySQL

我确实有一个PHP脚本,用于搜索任何域的whois信息。我想将该信息存储到 MySQL 表中,以便以后使用。我该怎么做?

下面是我需要存储在MySQL表中的结果,引擎是MyISAM我尝试过文本方法但没有成功...

Registrant:
        Dns Admin
        Google Inc.
        Please contact contact-admin@google.com 1600 Amphitheatre Parkway
         Mountain View CA 94043
        US
        dns-admin@google.com +1.6502530000 Fax: +1.6506188571
    Domain Name: google.com
        Registrar Name: Markmonitor.com
        Registrar Whois: whois.markmonitor.com
        Registrar Homepage: http://www.markmonitor.com
    Administrative Contact:
        DNS Admin
        Google Inc.
        1600 Amphitheatre Parkway
         Mountain View CA 94043
        US
        dns-admin@google.com +1.6506234000 Fax: +1.6506188571
    Technical Contact, Zone Contact:
        DNS Admin
        Google Inc.
        2400 E. Bayshore Pkwy
         Mountain View CA 94043
        US
        dns-admin@google.com +1.6503300100 Fax: +1.6506181499
    Created on..............: 1997-09-15.
    Expires on..............: 2020-09-13.
    Record last updated on..: 2012-01-29.
    Domain servers in listed order:
    ns4.google.com
    ns1.google.com
    ns2.google.com
    ns3.google.com


MarkMonitor is the Global Leader in Online Brand Protection.
Domain Management
MarkMonitor Brand Protection™
MarkMonitor AntiPiracy™
MarkMonitor AntiFraud™
Professional and Managed Services
Visit MarkMonitor at www.markmonitor.com
Contact us at 1 (800) 745-9229
In Europe, at +44 (0) 203 206 2220

根据我的理解,如果你想保存信息,那么把数据库结构作为:

whois_table
{
id (num)(pk)
ip (varchar)
info(long text)
}

假设您有以下信息:http://www.whois.net/whois/facebook.com

$ip = 要插入的 IP 谁是 whois 信息$info = IP的WHOIS信息

INSERT INTO whois_table (ip, info ) values ($ip, $info);