2017 © Pedro Peláez
 

library extract_imgur

A class to extract image links from imgur URLS in PHP

image

rpunnett/extract_imgur

A class to extract image links from imgur URLS in PHP

  • Tuesday, February 17, 2015
  • by rpunnett
  • Repository
  • 1 Watchers
  • 1 Stars
  • 26 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 2 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

extract_imgur

extract_imgur is php class to pull out the actual image URL's from imgur links. It is based on the JS project 'impurge'., (*1)

Usage

use  Imgur\Imgur;

$url = 'http://imgur.com/4Bpn7iO'

#Checks if the link is from imgur, returns true false : TRUE
Imgur::valid($url); 

#Returns the ID of the image : 4Bpn7iO
Imgur::getId($url); 

#Returns the TYPE of the link -> Album, Gallery, Hash, Image : Image
Imgur::getType($url); 

#Returns an array of URLs based on requested type
Type Options:
* original
* imgur_page
* small_square
* large_thumbnail

Imgur::getImage($url,'original');
/* For a gallery
url     [3]
0   :   http://i.imgur.com/x3Opkpv.jpg
1   :   http://i.imgur.com/oXLVTyT.jpg
2   :   http://i.imgur.com/1cbsAEZ.jpg
--- For an image
url [1]
0   :   http://imgur.com/4Bpn7iO
*/

Version

0.65, (*2)

Requirements

extract_imgur has the following requirements:, (*3)

  • cURL - Reads interwebs
  • PHP - Version 5.*

Dev Requirements

Preferred Installation

Use Composer: https://packagist.org/packages/rpunnett/extract_imgur, (*4)

Normal Installation

Copy to a project directory and include the namespace 'Imgur\Imgur', (*5)

git clone https://github.com/rpunnett/extract_imgur.git extract_imgur
cd extract_imgur-<version>
cp src <include path>

License

MIT, (*6)

The Versions

17/02 2015

dev-master

9999999-dev https://github.com/rpunnett/extract_imgur

A class to extract image links from imgur URLS in PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

The Development Requires

api image imgur

17/02 2015

dev-development

dev-development https://github.com/rpunnett/extract_imgur

A class to extract image links from imgur URLS in PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

The Development Requires

api image imgur

17/02 2015

v1.2.0

1.2.0.0 https://github.com/rpunnett/extract_imgur

A class to extract image links from imgur URLS in PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

The Development Requires

api image imgur

14/02 2015

v1.0.0

1.0.0.0 https://github.com/rpunnett/extract_imgur

A class to extract image links from imgur URLS in PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

api image imgur