This package unwraps urls like t.co or bit.ly to actual destination urls by doing an HTTP request and remembering the redirect chain.
You can install the package via composer:
composer require exfriend/uncurl
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
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email vlad@serpentine.io instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.