"Original": before using php to query domain name whois information, a whois query tool was specially deployed on the plog.cn server to implement "plog.cn 1-6 Super-expecting to delete short domain names. PS: method of use
This article describes how to query whois information in php. It involves the related skills of querying php domain names. For more information, see
This article describes how to query whois information in php. It involves the related skills of
How to query whois information in php
This example describes how to query whois information in php. Share it with you for your reference. The details are as follows:
Php is used to query the whois information list.
?
1 2 3 4 5 6 7 8 9 10
Here we obtain data from the data interface of the WAN or new network, and then output it through the simple text processing of PHP.
Copy CodeThe code is as follows:
$domain = $_get[' Q '];
Preg_match ("
(. +?)
Is ", @file_get_contents ('
Use PHP to query the domain name status whois class. Copy the code as follows :? ClassSearchDomain {var $ domain; functionSetDomain ($ udomain) {$ this-domain $ udomain;} get whois and analyze the domain name status. OK is not registered. it is not
Here we obtain data from the data interface of the WAN or new network, and then output it through the simple text processing of PHP.
Copy Code code as follows:
$domain = $_get[' Q '];
Preg_match ("|
(. +?)
|is ",
I. Classification of information collection
The methods of information collection can be grouped into two categories:
1. Active Collection: Active collection is to obtain relevant information, such as ICMP ping or TCP port scan, by directly
Use PHP to query the domain name status whois class
The code is as follows:
Class SearchDomain{Var $ domain = "";Function SetDomain ($ udomain){$ This-> domain = $ udomain;}//// Obtain whois and analyze the domain name status// OK is not
The previous article mainly introduced Python through the socket query Whois method, involving Python based on the Socket module query related skills, with a certain reference value, the need for friends can refer to the next http://www.cnblogs.com/
Let's start by understanding several file manipulation functions:
The fwrite () function writes to the file (which is safe for binary files).
Fwrite () writes the contents of the string to the file pointer. If length is specified, the write
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.