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

Class: Services_TinyURL

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

Class Overview


Services_TinyURL


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 70]
Services_TinyURL

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



[ Top ]


Class Variables

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

[line 78]

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

Type:   string


[ Top ]



Method Detail

create   [line 88]

string create( string $destination)

Create a TinyURL
  • Access: public

Parameters:

string   $destination   —  The URL to make tiny

[ Top ]

lookup   [line 118]

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:10:02 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.