SRAN Short URL's API
(update on 7/10/2009)
Features
- Generate or get existing short URLs, with sequential or custom keyword
- Get some statistics about your links: top clicked links, least clicked links, newest links
- Output format: JSON, XML, or simple raw text
Usage
You need to send parameters to http://sran.org/sran-api.php either via GET or POST. These parameters are:
- The requested
action: "shorturl" (get short URL for a link) or "stats" (get stats about your links) - With action = "shorturl" :
- the
urlto shorten - optional
keywordfor custom short URLs - output
format: either "json", "xml" or "simple"
- the
- With action = "stats" :
- the
filter: either "top", "bottom" , "rand" or "last" - the
limit(maximum number of links to return) - output
format: either "json" or "xml"
- the
Sample return
Sample PHP implementation
