PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Quick Start

Using one of the URL shortener services is straightforward. Each URL shortener follows a simple interface that defines two methods: shorten() and unshorten(). Instantiate the class, and call the appropriate method.

<?php
$tinyurl 
= new Zend_Service_ShortUrl_TinyUrlCom();

// Shorten a URL:
$short $tinyurl->shorten('http://framework.zend.com/'); // http://tinyurl.com/rxtuq

// Inflate or unshorten a short URL:
$long  $tinyurl->unshorten('http://tinyurl.com/rxtuq'); // http://framework.zend.com/

Zend Framework