Getting the most out of Lessn

September 23rd, 2009 | Tutorials

As I wrote about a little while ago, I’ve been using my own URL shortener, powered by Lessn (app install notes here, and info about the update here). If ridiculously hyper sentences like that aren’t convincing enough, linking and how we link is very important.

I have been loving Shaun Inman’s script so much that I was getting really miserly about how I was using the precious first 35 short URLs that have only one character (disappointingly symbols and capitalized characters aren’t used. I think that’s a function of base_convert). In fact, to make sure I’m using them wisely I just “reserved” the last 12 single character URLs for manual use, or maybe installing Lessn again under something like as the tutorial suggests, instead of in the root!

One great way to make sure you’re getting the most out of Lessn is to make sure you don’t shorten a URL more than once! It could happen so easily as I discovered. You get talking about a site or project, and you want to share the brilliantly shortened link. But what was that Lessn URL again? Then you waste time searching back… was it H? G? 5? It would be too tempting to shorten it again.

To solve this minor issue I wrote a page to be added to Lessn called listr.php. Listr basically digs into the database to list all the original URLs and the shortened URL.



This couldn’t be easier to add to your Lessn install. Simply download the file, uncompress it and FTP it to Once you login and go to you will see all of the URLs you’ve shortened over time. Download

Note, this Listr page isn’t private, and anyone who browses to it will be able to see your list. I figure that’s fine, as anyone who can see your Short URL can guess the other short URLs. To make your Listr private include the “index.php” (which has session sniffing cookie action) and scrap the then redundant includes like config.php and db.php. You can then also remove the defines on LESSN_URL and LESSN_DOMAIN.

The results are listed in a table which you can customize. For instance you might not want your ID column, and you might want the short URL to be a link (I commented this out).

Note, I’m not a “PHP Poet” so maybe some of the server calls and code could be made more elegant. Maybe pagination or search will become an issue once you’ve had Lessn installed for a while. If you make some improvements please let me know, I’d love to share it here.

31 Responses to “Getting the most out of Lessn”

  1. Great work… nice to be able to keep track of your already-shortened URLs. Here’s a suggested style change:

  2. ArleyM says:

    Epic! Thanks Jesse, I have updated the file in the zip. I also added an ORDER BY in the SQL select.

  3. Scott says:

    Great script Arley! Thanks for sharing it as well!

  4. [...] also uploaded a nifty little add-on from Debut Creative called Listr which lists all the original URL’s plus the shortened URL in a table so you can review the [...]

  5. Abraham Vegh says:

    This is an awesome addition to Lessn, but re-shortening the same URL will return the original shortcode, not a new one.

  6. ArleyM says:

    I guess I never tried and assumed!

    Still, I have used Listr countless times – often when I forget both URLs, but remember bookmarking it.

  7. Does anyone have any idea why I would be getting a 404 on this page when it’s been uploaded?

  8. So I got all jumbled up with my FTP accounts and was just uploading it to the wrong directory. HA!

    Works great. Thanks man :)

  9. Erica K. says:

    Great idea! To simplify even further I added an include pointing to listr.php at the bottom of /-/index.php so it automatically loads the already shortened urls without me having to go anywhere special. I suppose you could include a link to the list if you didn’t want it showing up every time as well. :)

  10. It’s a shame you don’t have a donate button! I’d most certainly donate to this brilliant blog! I guess for now i’ll settle for
    bookmarking and adding your RSS feed to my Google account.
    I look forward to brand new updates and will talk about
    this blog with my Facebook group. Chat soon!

  11. Even French politicians don’t get laid as much as 350 skin whitening home remedies for dry skin calories higher each day. Apply on to face for 5 to 10 minutes.

  12. Umm, could I have easier to understand version of this post?

  13. tips says:

    Whats up are using WordPress for your blog platform? I’m
    new to the blog world but I’m trying to get started and set up
    my own. Do you need any coding knowledge to make your own
    blog? Any help would be greatly appreciated!

    Here is my weblog: tips

  14. Hey there! I know this is somewhat off topic but I was wondering if you
    knew where I could get a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having
    trouble finding one? Thanks a lot!

  15. They’re just fire confirmation iles and in addition carry a
    good rating for any exct same. A house goes through several problems like leakage of attic, mildew
    growth, blistering of paint, crcked shingles, annd decay of siding
    that needs to be spotted onn time and remodeled sso that it become safe for living.
    They can be low in maintenance requirement as they are generally inexpensive as well as arre light weight and more
    appropriate for moost of roof designs you can buy.

    My website roofers cincinnati

  16. But selectting a most proficient roofing contractor is not eassy as you can find many experienced or inexperienced Miami roofing contractors.
    The second phase will introduce another 150 bikes in uptown Cincinnati near the hospitals and the
    University of Cincinnati. Don’t be concerned if there are
    paqst problems but rather how thbey were resolved or addressed with the client.

    Look into my site Northern Kentucky Roofing Repairs

  17. Clint says:

    Just աhat I was searching for, appreciate іt for posting .
    “In England every man you meet is some man’s son in America, he may be some man’s father.” by
    Ralph Waldo Emerson.

  18. Quinton says:

    After I initially commented I appear tto have clicked the -Notify me when new comments are added- checkjbox and from now on every time a comment is added
    I receive four emails witgh the exact same comment.
    Is there an easy method you are able to remove me from that
    service? Thanks!

  19. Hey! This post could not be written any better! Reading this post reminds me of
    my previous room mate! He always kept chatting about this.
    I will forward this article to him. Fairly certain he will have a
    good read. Thanks for sharing!

    Also visit my webpage; comment hacker une chaa®ne youtube sans protector

  20. Chandra says:

    excellent points altogether, you simply gaineed a logo new reader.

    What maay you suggest in regards to your suubmit that
    you just made some days in the past? Any positive?

  21. Jocelyn says:

    Hi, for all time i used to check weblog posts here early in the break of
    day, because i love to learn more and more.

  22. Be at or below the range of one complaint per
    6,000 to 8,000 messages, or 0. Aforesaid email services provide desire
    junk mails moderate function. You will immediately know who are
    your fake friends because they did not invite you to their
    gala dinner they are hosting.

  23. It’s really very difficult in this full of
    activity life to listen news on TV, thus I only use internet for
    that reason, and get the most recent news.

  24. First off I want to say wonderful blog! I had a quick
    question in which I’d like to ask if you don’t mind.
    I was curious to know how you center yourself and clear
    your mind prior to writing. I’ve had a hard time clearing my mind in getting
    my ideas out. I do enjoy writing but it just seems like the first 10 to 15 minutes tend to be wasted just trying to figure out how to begin. Any recommendations or
    tips? Cheers!

  25. If some one desires expert view on the topic of blogging and site-building then i propose him/her to pay a visit this blog,
    Keep up the good job.

  26. What’s up, for all time i used to check web site
    posts here early in the morning, because i enjoy to find out
    more and more.

  27. Have you ever considered about adding a little bit more than just your articles?
    I mean, what you say is important and all. However think about
    if you added some great visuals or video clips to give your posts more, “pop”!
    Your content is excellent but with images and clips, this blog could undeniably be one of the most beneficial in its field.
    Amazing blog!

  28. An impressive share! I’ve just forwarded this onto a coworker who has been conducting a
    little research on this. And he in fact ordered me lunch
    due to the fact that I discovered it for him… lol. So let me reword this….
    Thank YOU for the meal!! But yeah, thanx for spending time to talk about this matter
    here on your website.

  29. Blog posts says:

    Would making 8 or 10 thousand dollars per month from a simple Blog posts make positive
    changes to life. Without much effort in any respect you may be very much more educated about the subject.
    A community of your customers liking your products or services and services may be built online which means your company grows stronger.

  30. Great beat ! I would like to apprentice while you amend your website,
    how could i subscribe for a weblog site? The account aided me a acceptable deal.
    I had been tiny bit familiar of this your broadcast offered vibrant transparent concept

Leave a Reply to โฆษณา facebook มีปัญหา