{"id":603,"date":"2009-10-24T16:59:52","date_gmt":"2009-10-24T19:59:52","guid":{"rendered":"http:\/\/wordpress.matbra.com\/?page_id=603"},"modified":"2010-09-23T21:13:12","modified_gmt":"2010-09-24T00:13:12","slug":"lurl","status":"publish","type":"page","link":"https:\/\/wordpress.matbra.com\/en\/code\/lurl\/","title":{"rendered":"LURL"},"content":{"rendered":"<p>LURL &#8211; Little URL &#8211; A program to create shortened urls.<\/p>\n<p><strong>Download:<\/strong><br \/>\n<a rel=\"attachment wp-att-604\" href=\"http:\/\/wordpress.matbra.com\/code\/lurl\/lurlv2-php\/\">LURL version 2 to PHP4<\/a><br \/>\n<a rel=\"attachment wp-att-605\" href=\"http:\/\/wordpress.matbra.com\/code\/lurl\/lurlv2-php5\/\">LURL version 2 to PHP5<\/a><\/p>\n<p><strong>Changelog version 0.2:<\/strong><br \/>\n&#8211; Changes in method to generate the key.<br \/>\n&#8211; Minor bugs from PHP4 version.<br \/>\n&#8211; Change all the classes of version to PHP5<\/p>\n<p><strong>Dependencies: <\/strong><br \/>\n&#8211; PHP4 or PHP5<br \/>\n&#8211; mod_rewrite<\/p>\n<p><strong>Next functionalities (probably):<\/strong><br \/>\n&#8211; Page with list of links letting user to see stats of each link<\/p>\n<p><strong>How to use: <\/strong><br \/>\n&#8211; Create the database with the tables<br \/>\n&#8211; Setup Config.php. Example:<\/p>\n<blockquote><p>$config[&#8220;hostname&#8221;] = &#8220;localhost&#8221;;<br \/>\n$config[&#8220;username&#8221;] = &#8220;matheus&#8221;;<br \/>\n$config[&#8220;password&#8221;] = &#8220;yourpassord&#8221;;<br \/>\n$config[&#8220;dbname&#8221;] = &#8220;lurl_db&#8221;;<br \/>\n$config[&#8220;domain&#8221;] = &#8220;http:\/\/wordpress.matbra.com&#8221;;  \/\/ Define a configura\u00e7\u00e3o da URL inicial (http:\/\/wordpress.matbra.com)<br \/>\n$config[&#8220;path&#8221;] = &#8220;lurl&#8221;; \/\/  caminho\/caminho2 (onde est\u00e1 os scripts do LURL)<br \/>\n$config[&#8220;my_keys&#8221;] = &#8220;0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&#8221;;<br \/>\n$config[&#8220;num_chars&#8221;] = 6;<\/p><\/blockquote>\n<p>&#8211; Create MOD_REWRITE. Exemple:<\/p>\n<blockquote><p>&lt;IfModule mod_rewrite.c&gt;<\/p>\n<p>RewriteEngine On<br \/>\nRewriteBase \/<\/p>\n<p># REDIRECT ACCESS FROM \/XXXXXX<br \/>\n# TO \/lurl\/index.php?u=XXXXXX it is possible to have more chars. (use {7} {8} for it&#8230;)<br \/>\nRewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule ^([A-Za-z0-9]{6})$ \/lurl\/index.php?u=$1 [L]<\/p>\n<p># IT WAS IN MY MOD REWRITE<br \/>\nRewriteCond %{REQUEST_FILENAME} !-f<br \/>\nRewriteCond %{REQUEST_FILENAME} !-d<br \/>\nRewriteRule . \/index.php [L]<\/p>\n<p>&lt;\/IfModule&gt;<\/p><\/blockquote>\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>LURL &#8211; Little URL &#8211; A program to create shortened urls. Download: LURL version 2 to PHP4 LURL version 2 to PHP5 Changelog version 0.2:&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/wordpress.matbra.com\/en\/code\/lurl\/\">Continue reading<span class=\"screen-reader-text\">LURL<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"parent":444,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-603","page","type-page","status-publish","hentry","entry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/PsjGE-9J","_links":{"self":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/pages\/603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/comments?post=603"}],"version-history":[{"count":1,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/pages\/603\/revisions"}],"predecessor-version":[{"id":947,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/pages\/603\/revisions\/947"}],"up":[{"embeddable":true,"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/pages\/444"}],"wp:attachment":[{"href":"https:\/\/wordpress.matbra.com\/en\/wp-json\/wp\/v2\/media?parent=603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}