Obtain the IP address of the NIU news publishing system and the ip address of the NIU News Publishing System

Source: Internet
Author: User

Obtain the IP address of the NIU news publishing system and the ip address of the NIU News Publishing System

Niuke's press release is underway. In the face of the background production of the first 17 sets, there is a sense of mutual sorrow. I have to admire Niu's (although he is not surnamed NIU) macro grasp of a system. Then I came to the front-end design of HTML, and the instructor once again shocked me, and the code adjustment time was basically no more than five seconds. It makes a coincidence that a ship is naturally straight to the bridgehead.

Finally, I came to the front-end and back-end Integration Section. This error occurs when I obtain the IP address of the access page.

You can see no. in the upper-left corner of the page, my local IP Address should appear, but the following error occurs: 1.

First, I found the cause of the error: Because my system is a win764-bit operating system, ipv6 is used.

Let's look at my code first.

<Span style = "font-size: 18px;"> <strong> // Number of added data string com_content = txtcomment. text; string newsid = Request. queryString ["newsid"]; string userIp = Request. serverVariables ["REMOTE_ADDR"]; </strong> </span>
The code above is important to string userIp = Request. ServerVariables ["REMOTE_ADDR. However, I checked a lot of methods, but I couldn't solve the problem by not displaying: 1. Let it display the local ip address, so I came up with this method.

<Span style = "font-size: 18px;"> <strong> // Number of added data string com_content = txtcomment. text; string newsid = Request. queryString ["newsid"]; string userIp = Request. serverVariables ["REMOTE_ADDR"]; if (userIp = ": 1") {userIp = "192.168.24.100" ;}</strong> </span>

Last shown:


If you have a better way, You can exchange ideas with me.

Last

Request. ServerVariables []
Request. ServerVariables ["Url"]
Back to server address


Request. ServerVariables ["Path_Info"]
Path information provided by the client


Request. ServerVariables ["Appl_Physical_Path"]
Physical path corresponding to the application metadatabase path


Request. ServerVariables ["Path_Translated"]
Path obtained after ing from virtual to physical


Request. ServerVariables ["Script_Name"]
Script Execution name


Request. ServerVariables ["Query_String"]
Query string content


Request. ServerVariables ["Http_Referer"]
Request string content


Request. ServerVariables ["Server_Port"]
Server port number that receives the request


Request. ServerVariables ["Remote_Addr"]
IP address of the remote host that sends the request


Request. ServerVariables ["Remote_Host"]
Name of the remote host that sends the request


Request. ServerVariables ["Local_Addr"]
Returns the server address that receives the request.


Request. ServerVariables ["Http_Host"]
Back to server address


Request. ServerVariables ["Server_Name"]
Host Name, DNS address, or IP address of the server


Request. ServerVariables ["Request_Method"]
Request methods such as GET, HEAD, and POST


Request. ServerVariables ["Server_Port_Secure"]
If the server port receiving the request is a security port, the value is 1. Otherwise, the value is 0.


Request. ServerVariables ["Server_Protocol"]
Name and version of the protocol used by the server


Request. ServerVariables ["Server_Software"]
Name and version of the server software that responds to the request and runs the Gateway


Request. ServerVariables ["All_Http"]
All HTTP headers sent by the client, prefixed with HTTP _


Request. ServerVariables ["All_Raw"]
All HTTP headers sent by the client have the same results as those sent by the client without the prefix HTTP _


Request. ServerVariables ["Appl_MD_Path"]
Metadatabase path of the application


Request. ServerVariables ["Content_Length"]
Length of the content sent by the client


Request. ServerVariables ["Https"]
If the request passes through the Secure Channel (SSL), ON is returned. If the request comes from an insecure channel, OFF is returned.


Request. ServerVariables ["Instance_ID"]
ID of the IIS instance


Request. ServerVariables ["Instance_Meta_Path"]
Metadatabase path of the IIS instance that responds to the request


Request. ServerVariables ["Http_Accept_Encoding"]
The returned content is gzip and deflate.


Request. ServerVariables ["Http_Accept_Language"]
The returned content is en-us.


Request. ServerVariables ["Http_Connection"]
Returned content: Keep-Alive


Request. ServerVariables ["Http_Cookie"]
Returned content: Cookie value


Request. ServerVariables ["Http_User_Agent"]
Returned content: Mozilla/4.0 [compatible; MSIE6.0; WindowsNT5.1; SV1]


Request. ServerVariables ["Https_Keysize"]
Number of connections in the Secure Socket Layer, such as 128


Request. ServerVariables ["Https_Secretkeysize"]
The number of bits for Server Authentication for private keywords, for example, 1024


Request. ServerVariables ["Https_Server_Issuer"]
Issuer field of the server certificate


Request. ServerVariables ["Https_Server_Subject"]
Topic field of the server certificate


Request. ServerVariables ["Auth_Password"]
The password entered in the Password dialog box when the Basic Authentication mode is used


Request. ServerVariables ["Auth_Type"]
When a user accesses a protected script, the server is used to verify the user's authentication method.


Request. ServerVariables ["Auth_User"]
User Name of the Credential


Request. ServerVariables ["Cert_Cookie"]
Unique customer certificate ID


Request. ServerVariables ["Cert_Flag"]
Customer certificate flag. If a client certificate exists, bit0 is 0. If the client certificate verification is invalid, bit1 is set to 1.


Request. ServerVariables ["Cert_Issuer"]
Issuer field in the user certificate


Request. ServerVariables ["Cert_Keysize"]
Number of connections in the Secure Socket Layer, such as 128


Request. ServerVariables ["Cert_Secretkeysize"]
The number of bits for Server Authentication for private keywords, for example, 1024


Request. ServerVariables ["Cert_Serialnumber"]
Serial number field of the customer Certificate


Request. ServerVariables ["Cert_Server_Issuer"]
Issuer field of the server certificate


Request. ServerVariables ["Cert_Server_Subject"]
Topic field of the server certificate


Request. ServerVariables ["Cert_Subject"]
Subject field of the client certificate


Request. ServerVariables ["Content_Type"]
Form Content sent by the customer or the data type of HTTPPUT

This is a process of accumulation. The road to creating web pages has just begun .....


How can I install the NIU news and publishing system with the help of a teacher's error?

In fact, it is to get the HTML source code of a fixed website, and then use a regular expression to extract the content of the News list, this technology can be viewed by google in terms of "Collection. Niuyun:

Who has seen a video of the niugu news publishing system?

What is the specific problem ?? I can answer this question only when I speak it out ..
Static is a static method. It does not need to be instantiated and cannot call non-static members of the class. For example, a connection string is defined in the class. If it is not modified by static, if you call the test () static method, an error occurs ..

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.