Skip to content

exfriend/uncurl

Repository files navigation

Unfurl links in PHP

This package unwraps urls like t.co or bit.ly to actual destination urls by doing an HTTP request and remembering the redirect chain.

Installation

You can install the package via composer:

composer require exfriend/uncurl

Usage

Get the whole chain:

unfurl('http://google.com')->all();
// returns [ 'https://google.com', 'https://www.google.com' ];

Get the final destination:

unfurl('http://google.com')->last();
// returns 'https://www.google.com';

(string) unfurl('http://google.com')
// same as above

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email vlad@serpentine.io instead of using the issue tracker.

Credits

License

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

About

Unfurl links in PHP easily

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages