This article provides a summary of six php methods for obtaining IP addresses, which are simple and complex. you can choose your preferred method based on your project requirements. Code 1:
function getip() { static $ip = ''; $ip = $_SERVER['REMOTE_ADDR']; if(isset($_SERVER['HTTP_CDN_SRC_IP'])) { $ip = $_SERVER['HTTP_CDN_SRC_IP']; } elseif (isset($_SERVER['HTTP_CLIENT_IP']) preg_match('/^([0-9]{1,3}\.){3}[0-9]{1,3}$/', $_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP'];
Principle Analysis of automatic cracking tools on Discuz Forum
Recently, tools used to crack the Discuz Forum username and password by using a social engineering database have leaked many large forum user information. The analysis principles are as follows.Here, Discuz determines that the access IP address mainly uses the following logic:
private function _get_client_ip() { $ip = $_SERVER[;REMOTE_ADDR;]; if (isset($_SERVER[;HTTP_CLIENT_IP;]) preg_match(‘/^([0
FLASH, thus reducing system costs.
The cramfs file system stores data in Compressed Mode and decompress the data during running. Therefore, applications cannot run in xip mode. All applications must be copied to ram for running, however, this does not mean that the ram space required by ramfs is larger, because cramfs uses paging compression to store files. When reading files, it will not consume too much memory at once, only allocate memory for the
system to store the same file through a lower-capacity FLASH, thus reducing system costs.
The Cramfs file system stores data in Compressed Mode and decompress the data during running. Therefore, applications cannot run in XIP mode. All applications must be copied to RAM for running, however, this does not mean that the RAM space required by Ramfs is larger, because Cramfs uses paging compression to store files. When reading files, it will not consume
Today, I watched other colleagues try to use the Android mobile phone system. I couldn't help it, and I turned my M8 into a wince and Android dual system to try it out.
The entire process of flash is smooth. The steps are as follows:
Back up M8 data first to avoid losing any historical data, especially the address book and text message;
Download the android Rom. The Rom I used is the 9994 revised version + a13.5 new kernel dual-boot firmware version. Currently, there are basically no prob
of 10000-kb, the number of erased data is limited.Write speed is slow (because it usually needs to be erased first)The random access speed is fast and supports xip (execute in place, In-chip execution) and is suitable for code storage. Embedded systems are often used to store boot programs and root file systems.Small Single-Chip capacity, 1-32 MB
NAND FlashAddress/data line multiplexing, narrow data bitSlow reading speedThe erasure spe
The implementation under multi Bin's wince 5.0 and smdk2440 was about to be released earlier, but I saw that king_sundi had posted a post, so I hesitated to send it. Relatively speaking, my summary is more practical. Basically, it will be successful by following this step. I have tried it for some of my friends and they will be able to solve this problem at first.
Summary of xip implementation.
Step 1: Modify the config. bib file. The size of the kern
, adjust the flash clock(5) Using non-compressed cores(6) Turn off the serial print output(7) XIP Technology (EXecute in place)Kernel XIP: Run the kernel directly in Flash/rom, or use a non-compressed kernel vmlinux must be faster than Zimage, uimageFile system Xip: For example, Cramfs file system, only use the portion of the read into RAM, than JIFFS2 save time(
1. Opener and handler concepts of URLLIB2 1.1Openers:When you get a URL you use a opener (a urllib2. Openerdirector instances). Under normal circumstances, we use the default opener: through Urlopen. But you can create a personality openers. You can use Build_opener to create opener objects. Generally available for app
Opener: parent indicates the parent window. For example, if A page A uses iframe or frame to call page B, the window where page A is located is the parent of page B, the following describes how to use it in detail. If you are interested, refer
The Code is as follows:
$ ("# SaveInfo"). show ();SetTimeout ('$ ("# saveInfo"). hide ();', 3000 );If (opener ! Opener
The simple introduction to urllib2 is mentioned earlier. The following describes how to use urllib2.
1. Proxy Settings
By default, urllib2 uses the environment variable http_proxy to set HTTP proxy.
If you want to explicitly control the proxy in the program without being affected by environment variables, you can use the proxy.
Create test14 to implement a simple proxy Demo:
import urllib2enable_proxy = Trueproxy_handler = urllib2.ProxyHandler({"http" : 'http://some-proxy.com:8080'})null_proxy
iframe. the return value of open/window. one of the frames; msg is the message to be sent, string type; targetOrigin is used to restrict the uri of the receiverWindow, including the primary domain name and port. "*" indicates no limit, however, to ensure security, you still need to set the settings to prevent messages from being sent to malicious websites. If the URI of targetOrigin does not match the receiverWindow, the system will discard sending messages.B. The receiver obtains the message t
the real URL that is obtained, because Urlopen (or opener object) may have redirects. The URL you get may be different from the request URL.Info-The Dictionary object that returns the object that describes the page condition that was obtained. Typically, the server sends a specific header headers. It is now httplib. Httpmessage instance.8, did not read-- through Urlopen, but you can create the personality of the openers,openers using the processor ha
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.