PHPackages                             mremi/url-shortener - 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. mremi/url-shortener

ActiveLibrary[API Development](/categories/api)

mremi/url-shortener
===================

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

v2.4.0(4y ago)79719.0k—7.3%31[4 issues](https://github.com/mremi/UrlShortener/issues)[2 PRs](https://github.com/mremi/UrlShortener/pulls)6MITPHPPHP ^5.6 || ^7.0 || ^8.0

Since Jul 21Pushed 4y ago4 watchersCompare

[ Source](https://github.com/mremi/UrlShortener)[ Packagist](https://packagist.org/packages/mremi/url-shortener)[ Docs](https://github.com/mremi/UrlShortener)[ RSS](/packages/mremi-url-shortener/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (11)Used By (6)

URL shortener library
=====================

[](#url-shortener-library)

This library allows you to shorten a URL, reverse is also possible.

[![SensioLabsInsight](https://camo.githubusercontent.com/588373c7e59d36146d9b4f02f2ce7029fd709f094e7270d986d1e647e09ef680/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63346530366339642d353437632d343762622d386162622d6663636336386237646637612f6269672e706e67)](https://insight.sensiolabs.com/projects/c4e06c9d-547c-47bb-8abb-fccc68b7df7a)

[![Build Status](https://camo.githubusercontent.com/b39d92e7ad3c855580e10505246dbf79d6c56185f83edf47304451323ff9ec05/68747470733a2f2f6170692e7472617669732d63692e636f6d2f6d72656d692f55726c53686f7274656e65722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/mremi/UrlShortener)[![Total Downloads](https://camo.githubusercontent.com/c55c3959a4c41954e98ebb5c823cc66440dac9b1035b3d3dc5d9f055db153c6d/68747470733a2f2f706f7365722e707567782e6f72672f6d72656d692f75726c2d73686f7274656e65722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/mremi/url-shortener)[![Latest Stable Version](https://camo.githubusercontent.com/91da3186410d9572b02aed89ac4feebd396e93a33dcd67e4b1601524932e6efb/68747470733a2f2f706f7365722e707567782e6f72672f6d72656d692f75726c2d73686f7274656e65722f762f737461626c652e706e67)](https://packagist.org/packages/mremi/url-shortener)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/56624915fc52033129a0fb7c7a6c5a2d3d64215645e8f9fa98f49e9d23a11583/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d72656d692f55726c53686f7274656e65722f6261646765732f7175616c6974792d73636f72652e706e673f733d33346334626136623063643237323637336661313231633332613633653163653636386239623261)](https://scrutinizer-ci.com/g/mremi/UrlShortener/)[![Code Coverage](https://camo.githubusercontent.com/1549d2b3b33679ee4983a6bba0f49e572c618ff89c454ac19388b564ca6c1d3f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d72656d692f55726c53686f7274656e65722f6261646765732f636f7665726167652e706e673f733d37613863333338386165376235306633356664353438623462373837343532366336333465386335)](https://scrutinizer-ci.com/g/mremi/UrlShortener/)

**Basic Docs**

- [Installation](#installation)
- [Baidu API](#baidu-api)
- [Bit.ly API](#bitly-api)
- [Google API](#google-api)
- [Sina API](#sina-api)
- [Wechat API](#wechat-api)
- [Chain providers](#chain-providers)
- [Retrieve link](#retrieve-link)
- [Contribution](#contribution)

Installation
------------

[](#installation)

The preferred method of installation is via [Composer](https://getcomposer.org/). Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require mremi/url-shortener
```

Baidu API
---------

[](#baidu-api)

### Shorten

[](#shorten)

```
