Posts tagged with “php”
PHP Script Logger
I forgot about my old script logger and I didn't bring the page over from my old blog, it's a nice little web app. I made it to log various errors and problems to an sqlite database. You can see common errors, where they happened, etc. It's a bit old, but maybe someday I'll update it, though I think it'd be best if a php extension was made for it for the actual error capturing.
11:55 AM | Tags: phpTweetie 2.0 Custom URL Shortening
Tweetie 2.0 for iPhone came out recently and has a nice feature for specifying your own URL shortening service, like one that uses ButteredURLs. It's easy enough, might want to email yourself the API key from your install of ButteredURLs or visit it on the device. Then you can copy & paste it into the "Custom" option for URL shortening services in Tweetie's settings. You can view the API key when you're at the admin area.
The URL should look a little like this, replacing APIKEY with your own key:
http://example.com/-/?api=APIKEY&url=%@
Tweetie will replace %@ with the URL it's shortening. For more details on the custom shortening feature of Tweetie 2.0, see the developer page about it.
Also check out Tweetie 2 itself.
07:23 PM | Tags: tips, phpButteredURLs Updated
I just recently did some small updates to ButterdURLs which adds some features from the recently updated Lessn software from Shaun Inman.
1.1.1 Changes:
- Fix for issues #1 (shortening your own short URLs by accident)
- Support for api and redirect URL arguments thanks to Lessn 1.0.5
- Added new configuration option HOMEPAGE_URL for redirecting somewhere if no short url is given, i.e. my site I'll set to http://jeremyknope.com/
Also available recently is a OS X service for either Lessn or ButteredURLs thanks to Steve Streza:
Download
Source
11:43 PM | Tags: phpButtered URLs
So I recently took Shaun's Lessn and extended it a bit. I was not using MySQL for one, and also I wanted stats (and so did others). It's a pretty quick and dirty hack to lessn but so far seems to be working good. I added an install.php that will just run the needed SQL queries to set it up too, you can do install.php?start=1 if you already have regular lessn installed. This should execute the stats table creation queries along with adding a custom url field to the existing urls table.
Requirements
- PHP 5.1+ with PDO (typical on most hosts, but probably missing drivers on say your local OS X machine)
- MySQL or PostgreSQL (SQLite is probably easily doable)
Installation
- Upload it, make sure .htaccess is included if you use apache
- Edit -/config.php to reflect your database settings & admin user/pass prefrences
- Run install by visiting http://example.com/install.php
- If upgrading from regular lessn, http://example.com/install.php?start=1