An example of capturing information from another website (domain name query)

Source: Internet
Author: User
Tags domain name registration

<?
If (isset ($ XX )){
$ Dodo = @ file ("http://www.e9china.com/cgi-bin/comdns.pl? Raw = 1 & lookup = OK & FQDN = ". $ FQDN. "& domain = ". $ domain. "& root = ". $ root. & CDomain = 2.7 ");
$ I = 0;
While ($ dodo [$ I]) {
Echo $ dodo [$ I];
$ I ++;
}
Exit;
}
?>
<?
If (isset ($ submit )){
If ($ domain = "") {echo "Enter domain name"; exit ;}
$ Dom = @ file ("http://www.e9china.com/cgi-bin/comdns.pl? CDomain = 2.7 & lookup = OK & domain = ". $ domain." & root = ". $ root );
$ Dom1 = substr ("$ Dom [13]", 19 );
$ Dom1 = chop ($ dom1 );
Switch ($ dom1 ){
Case "Sorry! This domain name has been registered </font> ":
For ($ I = 0; $ I <32; $ I ++) {# I
Echo $ Dom [$ I];
}
?>
<Center>
<Form method = post action = "<? Echo $ php_self;?> ">
<Input type = "hidden" name = "FQDN" value = "<? Echo "$ domain. $ root"?> ">
<Input type = "hidden" name = "Domain" value = "<? Echo "$ domain. $ root"?> ">
<Input type = "hidden" name = "root" value = "<? Echo $ root?> ">
<Input type = "Submit" value = "display domain name registration details" name = "XX">
</Form>
</Center>
<?
Exit;
Break;
Case "Sorry! The domain name you entered is incorrect </font> ":
$ I = 0;
While ($ I <42 ){
Echo $ Dom [$ I];
$ I ++;
}
$ I = 51;
While ($ Dom [$ I]) {
Echo $ Dom [$ I];
$ I ++;
}
Exit;
Break;

case "congratulations: this domain name has not been registered and can be registered ":
?>


international domain name registration query result













face = "Arial, "> congratulations, this domain name has not been registered yet, available for registration


<BLOCKQUOTE>
<Span style = "font-family: Arial black; font-size: 25pt"> 2 </span>
<Span style = "font-family:; font-size: 9pt"> <font face = "Arial, "size =-1>
The <strong> "djdjdjdd.com" </strong> domain name you are querying is not yet registered. You can register this domain name.
</Span>
You can continue to query other noteable domain names.
</Font>
</BLOCKQUOTE>
<P>
<P>

<P>
</Body>
</Html>
<?
Exit;
Break;
}
}
?>


value = "OK">



www. size = "+ 1"> . com . net . org

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.