Objective
PHP is a powerful web development language. The development of high efficiency, simple syntax, for dynamic Web sites tailored to strengthen the object-oriented (to C closer to the point with Java), but a single thread (this is the Achilles ' heel, it is said that PHP is written in CC.) ), can also use C, C, Java development of the middle tier, call COM, server maintenance difficult, less trouble.
Since it is tailor-made for dynamic Web sites, it is doomed not to develop such a x-scan scanner, but if you want to achieve a number of simple functions, or more than sufficient.
Port scanning is our most common method of casing. If you're in an internet café, downloading a specialized scanner is a hassle, if you use an existing Web service to scan your port. That's really a lot to save.
Let's take a look at the source code of this PHP port scanner I wrote:
<?php
$youip = $HTTP _server_vars["REMOTE_ADDR"]; Get native IP address
$remoteip = $HTTP _post_vars[' Remoteip ']; Get the IP address of the form submission
?>
<title> Port Online Inspection </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style type= "Text/css" >
<!--
body {font-size:12px; Font-family:verdana;color: #000000;
}
TD {
font-size:12px;
Font-family:verdana;
Color: #000000;
line-height:14px;
}
. style1 {color: #FFFFFF}
-->
</style>
<body>
<center>
<?php
if (!empty ($REMOTEIP)) {
If the form is not empty, enter the IP address format of the decision
function err () {
Die ("Sorry, the IP address is not legal <p><a Href=javascript:history.back (1) > Click here to return </a>");