Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/shorten-urls.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Igor Escobar  >  Bitly-PHP  >  examples/shorten-urls.php  >  Download  
File: examples/shorten-urls.php
Role: Example script
Content type: text/plain
Description: How to shorten an url with Bitly-PHP
Class: Bitly-PHP
Expand or shorten URLs using the bit.ly site
Author: By
Last change: - New simple way to shorten urls
Date: 2010-04-02 08:15
Size: 193 bytes
 

Contents

Class file image Download
<?php

    
include_once("../bitly.php");
    
    
$bitly = new Bitly('<your_login>','<api_key>');
    echo 
$bitly->shorten('http://www.google.com/');
        
// echo will output the shorten url

?>