PHP Classes

File: example.php

Recommend this page to a friend!
  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: 14 years ago
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";

?>