<?php
/**
* This is an example script explaining how to use ShortIe.class.php
*
*/
/**
* require the class file
*/
require_once 'ShortIE.class.php';
/**
* Instantiate the ShortIE object and pass the URL to be shortened to the constructor
*/
$urlShorten = new ShortIe('http://binaryvibes.co.in');
/**
* Fetch the shortened URL
*/
$shortened = $urlShorten->getShortenedUrl();
/**
* Print the shortened URL
*/
echo $shortened;
echo "\n\n";
/**
* Alternate way to use the class
* $urlShorten = new ShortIe();
* $urlShorten->setUrlToBeShortened($myUrl);
* echo $urlShorten->getShortenedUrl();
*/
/**
* For php scripts, PHP, MySQL, Linux, JavaScript and web development articles, blogs and forums go to
* http://techchorus.net
*
* To avail commercial PHP development services go to
* http://binaryvibes.co.in
*/
|