A simple PHP online port scanner

Source: Internet
Author: User
Tags php online

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>");

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.