(RESTful) link shortener in PHP