An open API service indexing awesome lists of open source software.

https://github.com/gabboxl/linkshorter

A simple PHP class which inlcude the most link-shortener services.
https://github.com/gabboxl/linkshorter

adfly adfocus class link linkshortener php powerful shortener shorter simple useful-scripts

Last synced: 2 months ago
JSON representation

A simple PHP class which inlcude the most link-shortener services.

Awesome Lists containing this project

README

        

# LinkShorter [![Build Status](https://travis-ci.org/Gabboxl/LinkShorter.svg?branch=master)](https://travis-ci.org/Gabboxl/LinkShorter)

_A link. Shorter._

A simple PHP class which inlcude the most link-shortener services.
You can also log-in with your own credentials on all the services!

-----------------------------------------------------

The LinkShorter class is very simple to use,

here's an example:

`require "class-linkshorter.php";`

`$r = new LinkShorter($service, $link);`

replace `$service` variable with the name of the service (ex. adfly, adfocus, googl...) and the `$link` variable with the long url which you want to short.

To get the shorten link, use the `getLink` function: `$r->getLink();`

**You can also get errors with the** `getError` **method.** (Please visit the relative section)

There is a full working example in `example.php`.

You can find also a `method-specific documentation` (for adfly method, handling errors etc..) [here](https://linkshorter.gabboxl.ga/methods).

This class and the documentation **are still in developement**, so you can find bugs or other issues.