PHPackages                             dotzero/googl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dotzero/googl

AbandonedArchivedLibrary[API Development](/categories/api)

dotzero/googl
=============

A PHP5 library to generate shortened URL through The Google URL Shortener API

0.2.0(10y ago)838.0k↑22.7%6MITPHPPHP &gt;=5.3.0

Since Apr 11Pushed 8y ago2 watchersCompare

[ Source](https://github.com/zero-archive/googl-php)[ Packagist](https://packagist.org/packages/dotzero/googl)[ RSS](/packages/dotzero-googl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

PHP Googl
=========

[](#php-googl)

[![Build Status](https://camo.githubusercontent.com/87fd3c81ada9c33444caa7040ad4e7c78458b51273948c8f03dc5bbb31e84020/68747470733a2f2f7472617669732d63692e6f72672f646f747a65726f2f676f6f676c2d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dotzero/googl-php)[![Latest Stable Version](https://camo.githubusercontent.com/44fdf6db5e28fbe860867d5046a25922ff6217bc3eb4c0ea661faf1b6f600cb1/68747470733a2f2f706f7365722e707567782e6f72672f646f747a65726f2f676f6f676c2f76657273696f6e)](https://packagist.org/packages/dotzero/googl)[![License](https://camo.githubusercontent.com/cfaae242d23d469b42a6806630a3be41513668d43f4d3b89fcf3c28cc8cec022/68747470733a2f2f706f7365722e707567782e6f72672f646f747a65726f2f676f6f676c2f6c6963656e7365)](https://packagist.org/packages/dotzero/googl)

A PHP5 library to generate shortened URL through The Google URL Shortener API.

Usage
-----

[](#usage)

Using an Google API key is highly recommended. To acquire an API key follow [the instructions](https://developers.google.com/url-shortener/v1/getting_started#APIKey).

### Shorten URL

[](#shorten-url)

Shorten a long URL using The Google URL Shortener API

```
try {
    $googl = new \dotzero\Googl('YOUR_GOOGLE_API');
    echo $googl->shorten('http://github.com');
} catch (\dotzero\GooglException $e) {
    printf('Error (%d): %s', $e->getCode(), $e->getMessage());
}
```

### Expand URL

[](#expand-url)

Expand a short URL using The Google URL Shortener API

```
try {
    $googl = new \dotzero\Googl('YOUR_GOOGLE_API');
    echo $googl->expand('http://goo.gl/KkZ8');
} catch (\dotzero\GooglException $e) {
    printf('Error (%d): %s', $e->getCode(), $e->getMessage());
}
```

Install
-------

[](#install)

### Via composer:

[](#via-composer)

```
$ composer require dotzero/googl
```

### Without composer

[](#without-composer)

Clone the project using `git clone https://github.com/dotzero/googl-php/`and include the source file with `require_once("googl-php/src/Googl.php");`

Test
----

[](#test)

First install the dependencies, and after you can run:

```
GOOGLE_API=YOUR_GOOGLE_API vendor/bin/phpunit
```

License
-------

[](#license)

Licensed under the MIT license:

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3690d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/acb949df784d335647f74ca98bf03212a11f4f28ee459443aa599335de418c29?d=identicon)[dotzero](/maintainers/dotzero)

---

Top Contributors

[![dotzero](https://avatars.githubusercontent.com/u/265633?v=4)](https://github.com/dotzero "dotzero (15 commits)")

---

Tags

googlgooglephpapishortenergoogl

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dotzero-googl/health.svg)

```
[![Health](https://phpackages.com/badges/dotzero-googl/health.svg)](https://phpackages.com/packages/dotzero-googl)
```

###  Alternatives

[mremi/url-shortener

A PHP5/PHP7/PHP8 library using API to shorten/expand URL

79719.0k6](/packages/mremi-url-shortener)[mbarwick83/shorty

Google Url Shortener API Package for Laravel 5.1

31204.9k](/packages/mbarwick83-shorty)[phplicengine/bitly

Bitly API v4

22277.3k](/packages/phplicengine-bitly)[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)[mremi/url-shortener-bundle

Implementation of UrlShortener library for Symfony2/Symfony3

19135.0k](/packages/mremi-url-shortener-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
