]> CyberLeo.Net >> Repos - Github/YOURLS.git/blob - readme.html
HTML cleanup
[Github/YOURLS.git] / readme.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
3 <head>  \r
4         <meta http-equiv="X-UA-Compatible" content="chrome=1">\r
5         <meta http-equiv="content-type" content="text/html; charset=utf-8" />\r
6         <title>YOURLS: Your Own URL Shortener</title>\r
7         <style type="text/css" media="screen">\r
8                 /* Default Style */\r
9                 body {\r
10                         font-family: Verdana, Arial;\r
11                         font-size: 12px;\r
12                         color: #595441;\r
13                         background:#F3FAFD;\r
14                 }\r
15                 p {\r
16                         padding-left: 10px;\r
17                 }\r
18                 code {\r
19                         background:#eaeaef;\r
20                         padding:0 2px;\r
21                 }\r
22                 tt {\r
23                         background:#ffc;\r
24                         padding:0 2px;          \r
25                 }\r
26                 pre tt {\r
27                         display:block;\r
28                 }\r
29                 blockquote {\r
30                         margin: 10px 20px 0px 20px;\r
31                         padding: 10px;\r
32                         border: 1px solid #8d8d8d;\r
33                         background-color: #f5f5f5;\r
34                 }\r
35                 li {\r
36                         margin-top: 20px;\r
37                 }\r
38                 ul li ul li {\r
39                         margin-top: 10px;\r
40                 }\r
41                 a, a:active, a:link, a:visited {\r
42                         color: #5b87b4;\r
43                         text-decoration: none;\r
44                 }\r
45                 a:hover {\r
46                         color: #5577a5;\r
47                         text-decoration: underline;\r
48                 }\r
49                 div.sshot {\r
50                 }\r
51                 div.sshot p {\r
52                         color:#5577a5;\r
53                         font-size:90%;\r
54                 }\r
55                 div.sshot img {\r
56                         margin-bottom:1em;\r
57                         border-bottom:1px solid #ccc;\r
58                 }\r
59                 /* Place Holder Style */\r
60                 #Container {\r
61                         width: 780px;\r
62                         margin-left: auto;\r
63                         margin-right: auto; \r
64                 }\r
65                 #Content {\r
66                         background-color: #fff;\r
67                         border: 1px solid #2A85B3;\r
68                         padding: 10px;\r
69                         margin-top: -13px;\r
70                         -moz-border-radius:15px;\r
71                         -webkit-border-radius:15px;\r
72                 }\r
73                 /* Title Style */\r
74                 h1 {\r
75                         font-family: Verdana, Arial;\r
76                         font-size: 22px;\r
77                         font-weight: bold;\r
78                         color: #2a85b3;\r
79                         border-bottom: 1px solid #2a85b3;\r
80                         margin-bottom: 10px;\r
81                         background:transparent url(http://yourls.org/images/yourls-logo.png) top center no-repeat;\r
82                         padding-top:90px;\r
83                 }\r
84                 h1:hover span {\r
85                         color: #73A4D6;\r
86                 }\r
87                 h2 {\r
88                         font-family: Verdana, Arial;\r
89                         font-size: 18px;\r
90                         font-weight: bold;\r
91                         color: #5b87b4;\r
92                 }\r
93                 h2:before {\r
94                         content: '\00BB';\r
95                         color:#BFE0FE;\r
96                 }\r
97                 h3 {\r
98                         font-family: Verdana, Arial;\r
99                         font-size: 14px;\r
100                         font-weight: bold;\r
101                         color: #73a4d6;\r
102                         margin-top:2em;\r
103                 }\r
104                 h3:before {\r
105                         content: '\00BB';\r
106                         color:#BFE0FE;\r
107                 }\r
108                 /* Tabs */\r
109                 ul#Tabs {\r
110                         font-family: Verdana, Arial;\r
111                         font-size: 12px;\r
112                         font-weight: bold;\r
113                         list-style-type: none;\r
114                         padding-bottom: 28px;\r
115                         border-bottom: 1px solid #2A85B3;\r
116                         margin-bottom: 12px;\r
117                         margin-right:30px;\r
118                         margin-left:30px;\r
119                         z-index: 1;\r
120                 }\r
121                 #Tabs li.Tab {\r
122                         float: right;\r
123                         height: 25px;\r
124                         background-color: #deedfb;\r
125                         margin: 2px 0px 0px 5px;\r
126                         border: 1px solid #2A85B3;\r
127                         -moz-border-radius-topleft:5px;\r
128                         -moz-border-radius-topright:5px;\r
129                         -webkit-border-top-left-radius:5px;\r
130                         -webkit-border-top-right-radius:5px;\r
131                 }\r
132                 #Tabs li.Tab a {\r
133                         float: left;\r
134                         display: block;\r
135                         color: #666666;\r
136                         text-decoration: none;\r
137                         padding: 5px;\r
138                 }\r
139                 #Tabs li.Tab a:hover {\r
140                         background-color: #bfe0fe;\r
141                         border-bottom: 1px solid #bfe0fe;\r
142                 }\r
143                 /* Selected Tab */\r
144                 #Tabs li.SelectedTab {\r
145                         float: right;\r
146                         height: 25px;\r
147                         background-color: #fff;\r
148                         margin: 2px 0px 0px 5px;\r
149                         border-top: 1px solid #2A85B3;\r
150                         border-right: 1px solid #2A85B3;\r
151                         border-bottom: 1px solid #fafafa;\r
152                         border-left: 1px solid #2A85B3;\r
153                         -moz-border-radius-topleft:3px;\r
154                         -moz-border-radius-topright:3px;\r
155                         -webkit-border-top-left-radius:3px;\r
156                         -webkit-border-top-right-radius:3px;\r
157                 }\r
158                 #Tabs li.SelectedTab a {\r
159                         float: left;\r
160                         display: block;\r
161                         color: #666666;\r
162                         text-decoration: none;\r
163                         padding: 5px;\r
164                         cursor: default;\r
165                 }\r
166                 /* Copyright */\r
167                 #Copyright {\r
168                         text-align:center;\r
169                         margin-top:20px;\r
170                 }\r
171                 #Copyright p {\r
172                         padding:10px;\r
173                         background:white;\r
174                         margin:0 auto;\r
175                         width:750px;\r
176                         -moz-border-radius:10px;\r
177                         -webkit-border-radius:10px;\r
178                         border:1px solid #2A85B3;\r
179                         -moz-border-radius-bottomleft:30px;\r
180                         -moz-border-radius-bottomright:30px;\r
181                         -webkit-border-bottom-left-radius:25px;\r
182                         -webkit-border-bottom-right-radius:25px;\r
183                 }\r
184                 #Copyright p a {\r
185                         background:#fff url(http://yourls.org/images/favicon.gif) 2px center no-repeat;\r
186                         padding-left:20px;\r
187                 }\r
188         </style>\r
189 </head>\r
190 <body>\r
191 <div id="Container">\r
192         <!-- Title -->\r
193         <h1>YOURLS: <span>Y</span>our <span>O</span>wn <span>URL</span> <span>S</span>hortener</h1>\r
194 \r
195         <!-- Tabs -->\r
196         <ul id="Tabs">\r
197                 <li id="ShowcaseTab" class="Tab"><a href="#Showcase" onclick="toggle(this);">More</a></li>\r
198                 <li id="FAQTab" class="Tab"><a href="#FAQ" onclick="toggle(this);">FAQ</a></li>\r
199                 <li id="APITab" class="Tab"><a href="#API" onclick="toggle(this);">API</a></li>\r
200                 <li id="PluginTab" class="Tab"><a href="#Plugin" onclick="toggle(this);">WordPress plugin</a></li>\r
201                 <li id="ConfigTab" class="Tab"><a href="#Config" onclick="toggle(this);">Configuration</a></li>\r
202                 <li id="InstallTab" class="Tab"><a href="#Install" onclick="toggle(this);">Install/Upgrade</a></li>\r
203                 <li id="AboutTab" class="SelectedTab"><a href="#About" onclick="toggle(this);">About</a></li>\r
204         </ul>\r
205 \r
206         <!-- Content -->\r
207         <div id="Content">\r
208                 <!-- Index -->\r
209                 <div id="AboutDiv">\r
210                         <h2>About YOURLS</h2>\r
211                         \r
212                         <h3>What is YOURLS</h3>\r
213                         <p>YOURLS is a small set of PHP scripts that will allow you to run your own URL shortening service (<em>a la</em> TinyURL). You can make it private or public, you can pick custom keyword URLs, it comes with its own API. You will love it.</p>\r
214                         <p>There's a <a href="#Plugin" onclick="toggle(this);">WordPress plugin</a> available for YOURLS, making integration with your blog a snap: create short URLs and tweet them automagically as you publish blog posts.</p>\r
215                         \r
216                         <h3>YOURLS Features</h3>\r
217                         <ul>\r
218                                 <li><tt>Public</tt> (everybody can create short links) or <tt>private</tt> (your links only)</li>\r
219                                 <li>Sequential or custom URL keyword</li>\r
220                                 <li>Handy <tt>bookmarklet</tt> to easily shorten and share links</li>\r
221                                 <li>Awesome <tt>stats</tt>: historical click reports, referrers tracking, visitors geo-location</li>\r
222                                 <li>Neat <tt>AJAXed</tt> interface</li>\r
223                                 <li>Cool developer <tt>API</tt></li>\r
224                                 <li>Friendly <tt>installer</tt></li>\r
225                         </ul>\r
226                         \r
227                         <h3>Screenshots</h3>\r
228                         \r
229                         <div class="sshot">\r
230                                 <p>Main admin dashboard</p>\r
231                                 <img src="http://yourls.org/images/admin-dashboard.gif" />\r
232                                 \r
233                                 <p>Stats for each short URL</p>\r
234                                 <img src="http://yourls.org/images/stats_1.png" />\r
235                                 <img src="http://yourls.org/images/stats_2.png" />\r
236                                 <img src="http://yourls.org/images/stats_3.png" />\r
237                                 \r
238                                 <p>See a live example of YOURLS stats on <a href="http://yourls.org/download+">http://yourls.org/download+</a></p>\r
239                         </div>\r
240                         \r
241                         <h2>Download</h2>\r
242                         \r
243                         <p><a href="http://yourls.org/download">Download YOURLS</a> from Google Code</p>\r
244                         <p>You can follow YOURLS' development on the <a href="http://yourls.org/revisions">revision list</a> and get current snapshot <a href="http://yourls.org/svnco">using SVN</a></p>\r
245                         \r
246                         <h2>Credits</h2>\r
247                         \r
248                         <p>YOURLS is made by:</p>\r
249                         <ul>\r
250                                 <li><a href="http://yourls.org/lesterchan" title="Visit Lester Chan's site">Lester Chan</a> &ndash <a href="http://twitter.com/gamerz">@GamerZ</a> on Twitter</li>\r
251                                 <li><a href="http://yourls.org/ozh" title"Visit Ozh's site">Ozh Richard</a> &ndash <a href="http://twitter.com/ozh">@Ozh</a> on Twitter</li>\r
252                         </ul>\r
253                 </div>\r
254 \r
255                 <!-- Installation Instructions -->\r
256                 <div id="InstallDiv" style="display: none;">\r
257                         <h2>Fresh Install</h2>\r
258                         <ol>\r
259                                 <li>Unzip the YOURLS archive</li>\r
260                                 <li>Copy <code>includes/config-sample.php</code> to <code>includes/config.php</code></li>\r
261                                 <li>Open <code>includes/config.php</code> with a raw text editor (like Notepad) and fill in the required settings</li>\r
262                                 <li>Upload the unzipped files to your domain <code>public_html</code> or <code>www</code> folder</li>\r
263                                 <li>Create a new database (see <a href="#Config" onclick="toggle(this);">Configuration</a> &ndash; you can also use an existing one)</li>\r
264                                 <li>Point your browser to <code>http://yoursite.com/admin/</code></li>\r
265                         </ol>\r
266                         \r
267                         <h2>Upgrade from YOURLS 1.4</h2>\r
268                         <ol>\r
269                                 <li>Unzip the YOURLS archive</li>\r
270                                 <li>Upload files to your server, overwriting your existing install</li>\r
271                                 <li>Point your browser to <code>http://yoursite.com/admin/</code></li>\r
272                         </ol>\r
273                         \r
274                         <h2>Upgrade from YOURLS 1.3 or earlier</h2>\r
275                         <ol>\r
276                                 <li>Make a copy of your <code>config.php</code></li>\r
277                                 <li>Delete all files including <code>.htaccess</code> in YOURLS root directory</li>\r
278                                 <li>Unzip the YOURLS archive, upload the files</li>\r
279                                 <li>Copy <code>config-sample.php</code> to <code>config.php</code> and fill in details. <strong>Don't start with your old config file</strong>, use the new sample config file.</li>\r
280                                 <li>In your new <code>config.php</code>, add the <em>defines</em> for <code>YOURLS_DB_TABLE_URL</code> and <code>YOURLS_DB_TABLE_NEXTDEC</code> you had in your previous config file\r
281                                 <li><strong>Backup the database!</strong></li>\r
282                                 <li>Point your browser to <code>http://yoursite.com/admin/</code> and follow instructions</li>\r
283                                 <li>After upgrade is well and over, remove the define <code>YOURLS_DB_TABLE_NEXTDEC</code> from your config file</li>\r
284                         </ol>\r
285                         \r
286                 </div>\r
287 \r
288                 <!-- Configuration Instructions -->     \r
289                 <div id="ConfigDiv" style="display: none;">\r
290                         <h2>Configuration (in includes/config.php)</h2>\r
291                         <h3>MySQL settings</h3>\r
292                         <ul>\r
293                                 <li><code>YOURLS_DB_USER</code><br/>\r
294                                 your MySQL username<br/>\r
295                                 <em>Example:</em> <tt>'joe'</tt></li>\r
296                                 <li><code>YOURLS_DB_PASS</code><br/>\r
297                                 your MySQL password<br/>\r
298                                 <em>Example:</em> <tt>'MySeCreTPaSsW0rd'</tt></li>\r
299                                 <li><code>YOURLS_DB_NAME</code>:\r
300                                 The database name<br/>\r
301                                 <em>Example:</em> <tt>'yourls'</tt></li>\r
302                                 <li><code>YOURLS_DB_HOST</code><br/>\r
303                                 The database host<br/>\r
304                                 <em>Example:</em> <tt>'localhost'</tt></li>\r
305                                 <li><code>YOURLS_DB_PREFIX</code><br/>\r
306                                 The name prefix for all the tables YOURLS will need<br/>\r
307                                 <em>Example:</em> <tt>'yourls_'</tt></li>\r
308                         </ul>\r
309                         \r
310                         <h3>Site options</h3>\r
311                         <ul>\r
312                                 <li><code>YOURLS_SITE</code><br/>\r
313                                 Your (short) domain URL, no trailing slash<br/>\r
314                                 <em>Example:</em> <tt>'http://ozh.in'</tt></li>\r
315                                 <li><code>YOURLS_HOURS_OFFSET</code><br/>\r
316                                 Timezone GMT offset<br/>\r
317                                 <em>Example:</em> <tt>'-5'</tt></li>\r
318                                 <li><code>YOURLS_PRIVATE</code><br/>\r
319                                 Private means protected with login/pass as defined below. Set to false for public usage (on an intranet for instance)<br/>\r
320                                 <em>Example:</em> <tt>'true'</tt></li>\r
321                                 <li><code>YOURLS_UNIQUE_URLS</code><br/>\r
322                                 Allow multiple short URLs for a same long URL<br/>\r
323                                 Set to <tt>true</tt> to allow only one pair of shortURL/longURL (default YOURLS behavior), or to <tt>false</tt> to allow creation of multiple short URLs pointing to the same long URL (as bit.ly does)<br/>\r
324                                 <em>Example:</em> <tt>'true'</tt></li>\r
325                                 <li><code>YOURLS_COOKIEKEY</code><br/>\r
326                                 A random secret hash used to encrypt cookies. You don't have to remember it, make it long and complicated. Hint: generate a unique one at <a href="http://yourls.org/cookie">http://yourls.org/cookie</a><br/>\r
327                                 <em>Example:</em> <tt>'qQ4KhL_pu|s@Zm7n#%:b^{A[vhm'</tt></li>\r
328                                 <li><code>yourls_user_passwords</code><br/>\r
329                                 A list of username(s) and password(s) allowed to access the site if private<br/>\r
330                                 <em>Example:</em> <tt>'joe' => 'mypassword'</tt></li>\r
331                         </ul>\r
332                         \r
333                         <h3>URL Shortening settings</h3>\r
334                         <ul>\r
335                                 <li><code>YOURLS_URL_CONVERT</code><br/>\r
336                                 URL shortening method: base <tt>36</tt> or <tt>62</tt>. See <a onclick="toggle(this);" href="#FAQ">FAQ</a> for more explanations</li>\r
337                                 <li><code>yourls_reserved_URL</code><br/>\r
338                                 A list of reserved keywords that won't be used as short URLs. Define here negative, unwanted or potentially misleading keywords<br/>\r
339                                 <em>Example:</em> <tt>'porn', 'faggot', 'sex', 'nigger', 'fuck', 'cunt', 'dick', 'gay'</tt></li>\r
340                         </ul>\r
341                         \r
342                         <h3>Optional settings</h3>\r
343                         <ul>\r
344                                 <li><code>YOURLS_PRIVATE_INFOS</code><br/>\r
345                                 If <code>YOURLS_PRIVATE</code> is set to <tt>true</tt>, you can still easily make your individual stat pages public. To do so, override the global private setting with:<br/>\r
346                                 <tt>define('YOURLS_PRIVATE_INFOS', false);</tt>\r
347                                 </li>\r
348                                 <li><code>YOURLS_PRIVATE_API</code><br/>\r
349                                 If <code>YOURLS_PRIVATE</code> is set to <tt>true</tt>, you can still easily make your API public. To do so, override the global private setting with:<br/>\r
350                                 <tt>define('YOURLS_PRIVATE_API', false);</tt>\r
351                                 <li><code>YOURLS_NOSTATS</code><br/>\r
352                                 If <code>YOURLS_NOSTATS</code> is set to <tt>true</tt>, redirects won't be logged and there will be not stats available.<br/>\r
353                                 </li>\r
354                         </ul>\r
355                         \r
356                         <h3>Advanced settings</h3>\r
357                         <p>File <code>includes/yourls-load.php</code> contains a few more undocumented but self explanatory and commented settings. Add them to your own <code>config.php</code> if you know what you're doing</p>\r
358                 </div>\r
359                 \r
360                 <!-- WordPress plugin -->\r
361                 <div id="PluginDiv" style="display:none">\r
362                         <h2>WordPress Plugin</h2>\r
363                         \r
364                         <h3>Features</h3>\r
365                         <ul>\r
366                                 <li>Generate short URLs for each new post or page</li>\r
367                                 <li>Generate short URLs for all your old posts and pages if wished</li>\r
368                                 <li>Send a tweet on your Twitter account with the post title and short URL as you publish them</li>\r
369                                 <li>Works if YOURLS is hosted on the same server or on a remote server</li>\r
370                                 <li>Also compatible with tr.im, is.gd, tinyurl.com and bit.ly for maximum fun</li>\r
371                         </ul>\r
372                         \r
373                         <h3>Screenshots</h3>\r
374                         <div class="sshot">\r
375                         <img src="http://yourls.org/images/wpplugin.gif"/>\r
376                         </div>\r
377                         \r
378                         <h3>Download &amp; more informations</h3>\r
379                         <ul>\r
380                                 <li>Download <a href="http://yourls.org/plugin">YOURLS: WordPress to Twitter</a> from the official WordPress plugin repository</li>\r
381                                 <li>More information, tips and feedback on <a href="http://yourls.org/plugindoc">the plugin page</a> from planetOzh</li>\r
382                         </ul>\r
383                 \r
384                 </div>\r
385                 \r
386                 <!-- API -->\r
387                 <div id="APIDiv" style="display:none">\r
388                         <h2>YOURLS' API</h2>\r
389                         \r
390                         <h3>Features</h3>\r
391                         <ul>\r
392                                 <li>Generate or get existing short URLs, with sequential or custom keyword</li>\r
393                                 <li>Get some statistics about your links: top clicked links, least clicked links, newest links</li>\r
394                                 <li>Output format: JSON, XML, or simple raw text</li>\r
395                                 <li>Authentify either with login/password or using a secure passwordless mechanism</li>\r
396                         </ul>\r
397                         \r
398                         <h3>Usage</h3>\r
399                         <p>You need to send parameters to <code>http://yoursite.com/yourls-api.php</code> either via <code>GET</code> or <code>POST</code>. These parameters are:</p>\r
400                         <ul>\r
401                                 <li>A valid <code>username</code> / <code>password</code> pair, or your <code>signature</code> (see <a href="http://code.google.com/p/yourls/wiki/PasswordlessAPI">Passwordless API requests</a>)</li>\r
402                                 <li>The requested <code>action</code>: <tt>"shorturl"</tt> (get short URL for a link), <tt>"expand"</tt> (get long URL of a shorturl), <tt>"url-stats"</tt> (get stats about one short URL) or <tt>"stats"</tt> (get stats about your links)</li>\r
403                                 <li>With <tt>action = "shorturl"</tt> :\r
404                                         <ul>\r
405                                                 <li>the <code>url</code> to shorten</li>\r
406                                                 <li>optional <code>keyword</code> for custom short URLs</li>\r
407                                                 <li>output <code>format</code>: either <tt>"json"</tt>, <tt>"xml"</tt> or <tt>"simple"</tt></li>\r
408                                         </ul>\r
409                                 </li>\r
410                                 <li>With <tt>action = "expand"</tt> :\r
411                                         <ul>\r
412                                                 <li>the <code>shorturl</code> to expand (can be either 'abc' or 'http://site/abc')</li>\r
413                                                 <li>output <code>format</code>: either <tt>"json"</tt>, <tt>"xml"</tt> or <tt>"simple"</tt></li>\r
414                                         </ul>\r
415                                 </li>\r
416                                 <li>With <tt>action = "url-stats"</tt> :\r
417                                         <ul>\r
418                                                 <li>the <code>shorturl</code> for which to get stats (can be either 'abc' or 'http://site/abc')</li>\r
419                                                 <li>output <code>format</code>: either <tt>"json"</tt> or <tt>"xml"</tt></li>\r
420                                         </ul>\r
421                                 </li>\r
422                                 <li>With <tt>action = "stats"</tt> :\r
423                                         <ul>\r
424                                                 <li>the <code>filter</code>: either <tt>"top"</tt>, <tt>"bottom"</tt> , <tt>"rand"</tt> or <tt>"last"</tt></li>\r
425                                                 <li>the <code>limit</code> (maximum number of links to return)</li>\r
426                                                 <li>output <code>format</code>: either <tt>"json"</tt> or <tt>"xml"</tt></li>\r
427                                         </ul>\r
428                                 </li>\r
429                         </ul>\r
430                         \r
431                         <h3>Sample return</h3>\r
432                         <pre><tt>&lt;result&gt;\r
433         &lt;url&gt;\r
434                 &lt;id&gt;62019439011&lt;/id&gt;\r
435                 &lt;keyword&gt;shorter&lt;/keyword&gt;\r
436                 &lt;url&gt;http://somereallylongurlyouneedtoshrink.com/&lt;/url&gt;\r
437                 &lt;date&gt;2009-06-23 18:08:07&lt;/date&gt;\r
438                 &lt;ip&gt;127.0.0.1&lt;/ip&gt;\r
439         &lt;/url&gt;\r
440         &lt;status&gt;success&lt;/status&gt;\r
441         &lt;message&gt;http://somereallylongurlyouneedtoshrink.com/ (ID: shorter) added to database&lt;/message&gt;\r
442         &lt;shorturl&gt;http://yoursite.com/shorter&lt;/shorturl&gt;\r
443 &lt;/result&gt;</tt></pre>\r
444 \r
445                         <h3>Sample file</h3>\r
446                         <p>There's a sample file included that serves as an example on how to play with the API</p>\r
447 \r
448                 </div>\r
449                 \r
450 \r
451                 <!-- FAQ Instructions -->       \r
452                 <div id="FAQDiv" style="display: none;">\r
453                         <h2>FAQ</h2>\r
454 \r
455                         <h3>Server requirements</h3>\r
456                         <ol>\r
457                                 <li>A server with <strong>mod_rewrite</strong> enabled</li>\r
458                                 <li>At least <strong>PHP 4.3</strong></li>\r
459                                 <li>At least <strong>MYSQL 4.1</strong></li>\r
460                                 <li><em>Note</em>: YOURLS can also run on Nginx (<a href="http://foolrulez.org/blog/2009/08/foolz-us-make-yourls-work-on-ngin/">Read more</a>)</li>\r
461                         </ol>\r
462 \r
463                         <h3>Server recommendations</h3>\r
464                         <ul>\r
465                                 <li>PHP <a href="http://www.php.net/curl">CURL extension</a> installed if you plan on playing with the API</li>\r
466                         </ul>\r
467                         \r
468                         <h3>Limitations</h3>\r
469                         <ul>\r
470                                 <li>Maximum length of long URLs to be shortened is <strong>2000 characters</strong></li>\r
471                                 <li>Maximum length of custom keyword is <strong>200 characters</strong></li>\r
472                                 <li>That makes about <strong>8 sexdecillions of centillions</strong> of available URLs (<a href="http://en.wikipedia.org/wiki/Names_of_large_numbers">seriously</a>. That's a 355 digits number). </li>\r
473                         </ul>\r
474                         \r
475                         <h3>Difference Between Base 36 And Base 62 Encoding</h3>\r
476                         <ul>\r
477                                 <li>Base 36 encoding uses <code>0123456789abcdefghijklmnopqrstuvwxyz</code></li>\r
478                                 <li>Base 62 encoding uses <code>0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz</code></li>\r
479                                 <li>Stick to one setting, don't change after you've created links as it will change all your short URLs!</li>\r
480                                 <li>Base 36 is the default and should be picked.</li>\r
481                         </ul>\r
482                         \r
483                         <h3>Getting a short domain name for your YOURLS install</h3>\r
484                         <ul>\r
485                                 <li>Unless you plan on making it public, any shared hosting should be fine</li>\r
486                                 <li><a href="http://domai.nr/">Domainr</a> is a fun search tool that might inspire and help you</li>\r
487                                 <li>Aim for exotic top level domains (.in, .im, .li ...), they're often cheap and a lot are still available. <a href="https://www.gandi.net/domain/buy/search/">Gandi</a> is a pretty comprehensive registrar, for instance.</li>\r
488                         </ul>\r
489 \r
490                         <h3>YOURLS needs its own .htaccess</h3>\r
491                         <ul>\r
492                                 <li>You cannot install YOURLS and, say, WordPress, in the same directory. Both of them need to handle URLs differently</li>\r
493                                 <li>If you want to install YOURLS on the same domain than your blog, give it its own (short) subdirectory, such as yourblog.com/s/ (for "short") or yourblog.com/x/ (for "exit")</li>\r
494                         </ul>\r
495                         \r
496                         <h3>If YOURLS generates 404 for your short URLs</h3>\r
497                         <ul>\r
498                                 <li>Make sure <strong>mod_rewrite</strong> is enabled with your Apache server</li>\r
499                                 <li>Some (crappy) hosts such as GoDaddy or 1and1 need <a href="http://code.google.com/p/yourls/issues/detail?id=25">a small fix</a> to .htaccess</li>\r
500                         </ul>\r
501                         \r
502                         <h3>Feedback, feature requests and bug reporting</h3>\r
503                         <ul>\r
504                                 <li>Please don't get in touch directly by mail or Twitter. <a href="http://yourls.org/support">Please</a>.</li>\r
505                                 <li>Check the <a href="http://code.google.com/p/yourls/wiki/RoadMap">Road Map</a> for future features</li>\r
506                                 <li>Raise an <a href="http://yourls.org/issues">issue here</a> and give all the details. Thanks!</li>\r
507                         </ul>\r
508 \r
509                 </div>\r
510                 \r
511                 \r
512                                 <!-- Showcase -->       \r
513                 <div id="ShowcaseDiv" style="display: none;">\r
514                         <h2>Showcase</h2>\r
515 \r
516                         <h3>Here are a few examples of sites running YOURLS with a unique design or concept</h3>\r
517                         \r
518                         <ul>\r
519                                 <li><a href="http://hmm.ph/">http://hmm.ph/</a><br/>\r
520                                 Funny domain name, nicely styled</li>\r
521                                 <li><a href="http://qte.me/">http://qte.me/</a><br/>\r
522                                 Another YOURLS setup with a cute quote look</li>\r
523                                 <li><a href="http://mrte.ch/">http://mrte.ch/</a><br/>\r
524                                 Mr Tech's public YOURLS setup, listing top links and some stats</li>\r
525                                 <li><a href="http://s4c.in/">http://s4c.in/</a><br/>\r
526                                 Shorten 4 Charity, a public YOURLS setup with shortened links displayed within a frame containing ads for charities     </li>\r
527                                 <li><a href="http://girv.in/">http://girv.in/</a><br/>\r
528                                 John Girvin's YOURLS setup with all links in a sortable display</li>\r
529                                 <li><a href="http://www.iyeman.net/">http://www.iyeman.net/</a><br/>\r
530                                 Example of portal for your online self with links to your places (blog, Twitter) and your URL shortener</li>\r
531                                 <li><a href="http://li.nkto.me/">http://li.nkto.me/</a><br/>\r
532                                 A nice domain name hack :)</li>\r
533                                 <li><a href="http://vb.ly/">http://vb.ly/</a><br/>\r
534                                 Public YOURLS setup run by famous sex writer Violet Blue as "the internet's first and only sex-positive url shortener"</li>\r
535                                 \r
536                         </ul>\r
537                         \r
538                         <h2>More stuff about or with YOURLS</h2>\r
539                         \r
540                         <ul>\r
541                                 <li><a href="http://screenr.com/nTs">http://screenr.com/nTs</a><br/>\r
542                                 A screencast explaining how to setup YOURLS</li>\r
543                                 \r
544                                 <li><a href="http://v007.me/836">YOURLS: Short URL Widget</a><br/>\r
545                                 Creates a fully configurable widget that outputs the short URL to the current post or page</li>\r
546                                 \r
547                                 <li><a href="http://foolrulez.org/blog/2009/09/yourls-widget-released">YOURLS Widget for WordPress</a><br/>\r
548                                 This widget adds a convenient short URL service into your sidebar. Check the above link for a live example</li>\r
549                                 \r
550                                 <li><a href="http://github.com/pjain/WWW-Shorten-Yourls">WWW-Shorten-Yourls</a><br/>\r
551                                 A Perl module to shorten URLs using YOURLS</li>\r
552                                 \r
553                                 <li><a href="http://www.chrismarquardt.com/blog.php?id=7952283233607249761">Textexpander and YOURLS</a><br/>\r
554                                 Making YOURLS and Textexpander on the Mac play together</li>\r
555                                 \r
556                                 <li><a href="http://www.eugenegordin.com/etc/how-to-use-your-custom-yourls-shortener-with-tweetie-2.html">YOURLS and Tweetie 2</a><br/>\r
557                                 How to set up Tweetie2 so it uses your own service</li>\r
558                                 \r
559                                 <li><a href="http://www.mrtech.com/forums/index.php/topic,2524.0.html">YOURLS hacks</a><br/>\r
560                                 How to enhance YOURLS for spam control/throttling, unshortening and weekly stats\r
561                                 \r
562                                 <li><a href="http://code.google.com/p/yourls/issues/detail?id=137">Export URLS as text list</a><br/>\r
563                                 A simple script to list all URLs, one per line, in plain text (for using as an indexer config file, for example)</li>\r
564                                 \r
565                                 <li>YOURLS featured on <a href="http://lifehacker.com/5335216/make-your-own-url-shortening-service">Lifehacker</a></li>\r
566                         </ul>\r
567 \r
568                 </div>\r
569         </div> <!-- content -->\r
570 </div> <!-- container -->\r
571 \r
572 <div id="Copyright"><p><a href="http://yourls.org/">YOURLS</a>: Your Own URL Shortener<br />All Free & GPL &ndash; 2009</p></div>\r
573 \r
574         <script type="text/javascript">\r
575         /* <![CDATA[*/\r
576         // Dynamically get tabs\r
577         function getTabs() {\r
578                 var d = document.getElementById('Tabs');\r
579                 var matches = d.innerHTML.match(/<li id="(.+?)Tab"/g);\r
580                 var tabs = []\r
581                 for (i in matches) {\r
582                   tabs[i]= matches[i].replace('<li id="','').replace('Tab"', '');\r
583                 }\r
584                 tabs = tabs.reverse();\r
585                 return (tabs)\r
586         }\r
587         // Toggle tab display\r
588         function toggle(el) {\r
589                 //var tabs = ["About", "Install", "Config", "Plugin", "FAQ"];\r
590                 var target = el.toString().replace(/^.*#/, '');\r
591                 for (var tab in tabs) {\r
592                         // reinit tabs\r
593                         document.getElementById(tabs[tab]+'Tab').className = 'Tab';\r
594                         // reinit divs\r
595                         document.getElementById(tabs[tab]+'Div').style.display= 'none';\r
596                 }\r
597                 // highlight & display target\r
598                 document.getElementById(target+'Div').style.display = 'block';\r
599                 document.getElementById(target+'Tab').className = 'SelectedTab';\r
600                 try { el.blur(); } catch(err) {}\r
601         }\r
602         // Get tab list\r
603         var tabs = getTabs();\r
604         // On page load/refresh display required tab\r
605         if (location.hash) {\r
606                 toggle(location.hash);\r
607         }\r
608         /* ]]> */\r
609         </script>\r
610 \r
611 \r
612 </body>\r
613 </html>