SharePoint 2010 URL shortener -- SharePoint 2010 short URL Builder project description this project has added this feature, you can generate short URLs on the SP website. These URLs point to lists or documents. For example, http: // Smallville-PC/URL/nnefhmo.This project allows users to create short URLs pointing to do
I want to create a URL shortener service where can write a long URL into an input field and the service shortens the U RL to " http://www.example.org/abcdef ". Instead of " abcdef " "there can is any and string with six characters containing a-z, A-Z and 0-9 . That makes 56~57 billion possible strings.My approach:I have a database table with three columns:
This section: Details thinkphp URL rules, url pseudo-static, url routing, url rewriting, url generation one, URL rules 1, default is case-sensitive , 2, if we do not want to be case-sensitive can be changed to config fil
When posting URLs in a blog or email, these URLs are often meaningless and difficult to remember because they are too long, and may cause unnecessary line breaks. Http://zdd.me is an online URL shortening tool that can make long URLs shorter and more meaningful, as described in zdd. me URL shortener provides Web site shortening services for users of Windows Live
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 order to avoid affecting other files may have to change the code)
JavaScript implementations:
Top.location.href the address of the top-level windowThis.location.href the address of the current window
PHP Implementation:
Get domain name or host addressecho $_server[' Http_host ']. "”; #localhost
Get web Addressecho $_server[' php_self ']. "”; #/blog/testurl.php
Get URL parametersecho $_server["Query_string"]. "”; #id =5
Get user Agentecho $_server[' Http_referer ']. "”;
Get the full URLEcho ' http://'.
SerV
First, PHP gets the URL of the current page:
Copy the Code code as follows:
Get the current script URLfunction Getcururl (){if (!empty ($_server["Request_uri")){$scriptName = $_server["Request_uri"];$nowurl = $scriptName;}Else{$scriptName = $_server["Php_self"];if (Empty ($_server["query_string"])){$nowurl = $scriptName;}Else{$nowurl = $scriptName. "?". $_server["Query_string"];}}return $nowurl;}
The other is the value of a variable in the query sect
C # URL short address compression algorithm and short URL Principle example, detailed introduction of the short URL mapping algorithm, the long URL MD5 generated 32-bit signature string, divided into 4 segments, 8 bytes per segment, and then generate a short URL, see text ex
Seo friends now know the importance of URL static, URL pseudo static, and URL rewriting to Seo. Search Engines like static website pages. Today, we will analyze in detail the differences among static URLs, pseudo-static URLs, and URL rewriting.
Static URL. Static
This article transferred from: http://blog.csdn.net/chendi1985/article/details/5291773Window.location method Get URLUniform Resource Locator (Uniform Resource Locator, URL)The complete URL consists of the following parts:Scheme://host:port/path?query#fragmentScheme: Communication protocolCommon Http,ftp,maito, etc.Host: HostsThe server (computer) domain Name System (DNS) hostname or IP address.Port: Port nu
URL rewriting is the process of intercepting incoming Web requests and automatically redirecting requests to other URLs.For example, if the browser sends a request for hostname/101. aspx, the server automatically directs the request to http: // hostname/list. aspx? Id = 101.Url rewriting has the following advantages:Shorten the url and hide the actual path to imp
What is HTTP? Hypertext Transfer Protocol (Hypertext Transfer Protocol-HTTP) is a protocol designed to enable clients and servers to communicate smoothly.HTTP works with Request-response protocol (Request-reply protocol) between the client and the server. Get-gets data from the specified server post-submits data to the specified server to handle the GET method: When using the Get method, the query string (key-value pair) is appended to the URL address
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.