2017 © Pedro Peláez
 

library urlextender

This library extends short URLs to longURLs using HTTP-Header Location

image

tzfrs/urlextender

This library extends short URLs to longURLs using HTTP-Header Location

  • Thursday, September 10, 2015
  • by tzfrs
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

URLExtender

SensioLabsInsight, (*1)

This library can be used to expand short URLs such as https://t.co/XdXRudPXH5 and get the URL that is behind the short URL using Guzzles head method and reading the Location header, (*2)

Install

Install via composer:, (*3)

{
    "require": {
        "tzfrs/urlextender": "0.0.2.1"
    }
}

Run composer install or composer update., (*4)

Getting Started

Note: You can also see the examples.php for more examples., (*5)

Basic parsing

<?php
require __DIR__ . '/vendor/autoload.php';

$urlExtender = new \tzfrs\URLExtender\URLExtender();

try {
    print $urlExtender->extendURL('https://t.co/XdXRudPXH5'); // https://blog.twitter.com/2013/rich-photo-experience-now-in-embedded-tweets-3
    print $urlExtender->extendURL('https://blog.twitter.com/2013/rich-photo-experience-now-in-embedded-tweets-3'); //https://blog.twitter.com/2013/rich-photo-experience-now-in-embedded-tweets-3
    print $urlExtender->extendURL('http://httpstat.us/404'); // URLExtenderException (404)
    print $urlExtender->extendURL('http://httpstat.us/500'); // URLExtenderException (500)
} catch (\tzfrs\URLExtender\Exceptions\URLExtenderException $e) {
    print $e->getCode() . ': ' . $e->getMessage();
}

The Versions

10/09 2015

dev-master

9999999-dev

This library extends short URLs to longURLs using HTTP-Header Location

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

dev-develop

dev-develop

This library extends short URLs to longURLs using HTTP-Header Location

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

0.0.2.1

0.0.2.1

This library extends short URLs to longURLs using HTTP-Header Location

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

dev-release/0.0.2.1

dev-release/0.0.2.1

This library extends short URLs to longURLs using HTTP-Header Location

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

dev-feature/Sensiolabs_badges

dev-feature/Sensiolabs_badges

This library extends short URLs to longURLs using HTTP-Header Location

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

dev-hotfix/Sensiolabs_fixes

dev-hotfix/Sensiolabs_fixes

This library extends short URLs to longURLs using HTTP-Header Location

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

0.0.2

0.0.2.0

This library extends short URLs to longURLs using HTTP-Header Location

  Sources   Download

MIT

The Requires

 

The Development Requires

10/09 2015

0.0.1

0.0.1.0

This library extends short URLs to longURLs using HTTP-Header Location

  Sources   Download

MIT

The Requires

 

The Development Requires