mremi / UrlShortener

A PHP library to generate shortened URL through famous API like Bit.ly or Google
MIT License
79 stars 32 forks source link

Support is.gd provider? #13

Open irazasyed opened 5 years ago

irazasyed commented 5 years ago

Hi,

Is it possible you could add support for is.gd as one of the providers out of the box? That would be great and it doesn't require an API key.

mremi commented 5 years ago

Hi @irazasyed ,

I can't for now, time is missing but your contribution would be welcome :).

preeteshjain commented 5 years ago

@irazasyed I don't think you need this package for that. You can just do:

$shortLink = file_get_contents('https://is.gd/create.php?format=simple&url=' . $longLink);

And you will have your short link.

irazasyed commented 5 years ago

@preeteshjain Our use case is not limited to one service. Hence, using this package to support multiple services otherwise, I know it's just one line of code to shorten links with the aforementioned service.

@mremi Will send a PR once I start integrating this package into our app. Thanks!