Services_TinyURL
[ class tree: Services_TinyURL ] [ index: Services_TinyURL ] [ all elements ]

Class: Services_TinyURL

Source Location: /Services_TinyURL-0.1.2/Services/TinyURL.php

Class Overview


Services_TinyURL


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 71]
Services_TinyURL

  1.  <?php
  2.  require_once 'Services/TinyURL.php';
  3.  try {
  4.      $tiny = new Services_TinyURL();
  5.      $url $tiny->create('http://www.joestump.net');
  6.      echo $url;
  7.  catch (Services_TinyURL_Exception $e{
  8.      echo $e->getMessage();
  9.  }
  10.  ?>



[ Top ]


Class Variables

$api =  'http://tinyurl.com/api-create.php'

[line 79]

Location of TinyURL API
  • Var: URL of TinyURL API
  • Access: protected

Type:   string


[ Top ]



Method Detail

create   [line 89]

string create( string $destination)

Create a TinyURL
  • Access: public

Parameters:

string   $destination   —  The URL to make tiny

[ Top ]

lookup   [line 120]

string lookup( string $url)

Do a reverse lookup of a TinyURL
  • Return: The destination URL of the TinyURL
  • Access: public

Parameters:

string   $url   —  TinyURL to look up

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:11:55 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.