Download the PHP package vinelab/url-shortener without Composer

On this page you can find all versions of the php package vinelab/url-shortener. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package url-shortener

URL Shortener PHP Package

Latest Stable Version Latest Unstable Version Total Downloads Build Status Scrutinizer Code Quality License

vinelab/url-shortener is a PHP framework agnostic Package that makes it easy to shorten your URL's, with your favourite URL Shortening provider such as (Bit.ly, Goo.gl, Ow.ly).

The URL Shortening Providers are online services that takes long URLs and squeezes them into fewer characters to make the link easier to share, tweet, or send by email.

The package requires PHP 5.4+ and comes bundled with a Laravel 5 Facade and a Service Provider to simplify the optional framework integration and follows the FIG standard PSR-4 to ensure a high level of interoperability between shared PHP code and is fully unit-tested.

Highlights

Installation

The recommended way to install this package is via Composer.

Via Composer

A. Run this composer command:

B. Or manually add the package to your composer.json and run composer update.

Integrations

url-shortener is framework agnostic and as such can be integrated easily natively or with your favorite framework.

Laravel:

The url-shortener package has optional support for Laravel 5 and it comes bundled with a Service Provider for easier integration.

After you have installed the package correctly, just follow the instructions.

.1. Register the service provider in your config/app.php:

The service provider will automatically alias the Vinelab\UrlShortener\Shorten class, so you can easily use the Shorten facade anywhere in your app.

.2. Publish the configuration file:

Configuration

.1. Open url-shortener.php and select your default provider:

.2. Then add your provider token:

Note: It's very recommended to not add your token (any sensetive data) to the config file instead reference it to a .env variable.

And to do so:

  1. replace the 'token' => 'YOUR-TOKEN-HERE', with 'token' => env('BITLY_TOKEN'),

  2. open your .env file and add the token variable there with the token value: BITLY_TOKEN=YOUR-TOKEN-HERE.

  3. add the variable BITLY_TOKEN= to the .env.example for other developers.

Usage

With Laravel:

The easiest way is to use it is by the Shorten facade.

Test

To run the tests, run the following command from the project folder.

Contributing

Support new provider

To add support for a new URL shortening provider:

  1. write a driver for your URL Shortener service. check the Bitly driver Vinelab\UrlShortener\Drivers\Bitly class.
  2. add you driver configuration to the config file.
  3. write tests for your drvier.
  4. update the README file
  5. check out the Contribution Guide for general details.

Support

On Github

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of url-shortener with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 5.*
illuminate/config Version 5.*
symfony/finder Version ~2.7
vinelab/http Version 1.2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vinelab/url-shortener contains the following files

Loading the files please wait ....