Tag Archive for string

Using Bit.ly in CodeIgniter

I love Bit.ly.  You can make any URL you want short, you can your own URL it keeps it forever and you can even track hits.  Happily, they even make this available to API calls so you can automatically use it on your own site.  I’ve written a simple library that allows CodeIgniter to access the API and then caches it locally.

Read more

Abbreviating long strings in CodeIgniter

In the process of keeping websites secure, you can end up with really long strings.  If this is generated in the code and saved to sessions/cookies/database, this isn’t a huge problem.  However, if you need to publish such an encrypted string (for instance, in an account creation confirmation URL), having massive strings not only can be a problem it also looks unprofessional.  Of course, there are plenty of URL abbreviation systems out there (bit.ly and tinyURL.com to name but two), but a lot of the time you want to keep it within your own domain.  This is where my abbreviation model comes in handy.

Read more