Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Muhammad Arfeen  >  Shorten URL in a text using Bit.ly  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example script
Class: Shorten URL in a text using Bit.ly
Convert URLs in text to links using Bit.ly
Author: By
Last change:
Date: 2010-03-31 00:41
Size: 371 bytes
 

Contents

Class file image Download
<?php

// example

include_once "ExtConvLinks.inc.php";

$ECLObj = new ExtConvLinks("_your_bitly_login","_your_bitly_apikey");

$Text "This is a text with some links like http://www.php.net and http://phpclasses.org";

echo 
"text before conversion: <p>$Text";


$Text $ECLObj->ExtractAndConvert($Text);

echo 
"<p>text after conversion: <p>$Text";

?>