https://github.com/exfriend/uncurl
Unfurl links in PHP easily
https://github.com/exfriend/uncurl
Last synced: 4 months ago
JSON representation
Unfurl links in PHP easily
- Host: GitHub
- URL: https://github.com/exfriend/uncurl
- Owner: exfriend
- License: mit
- Created: 2019-04-04T11:13:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-14T18:44:46.000Z (about 6 years ago)
- Last Synced: 2025-02-12T04:41:23.796Z (4 months ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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:
```bash
composer require exfriend/uncurl
```## Usage
Get the whole chain:
``` php
unfurl('http://google.com')->all();
// returns [ 'https://google.com', 'https://www.google.com' ];
```Get the final destination:
``` php
unfurl('http://google.com')->last();
// returns 'https://www.google.com';(string) unfurl('http://google.com')
// same as above
```### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [Serpentine.io - The missing Google Search API](https://serpentine.io)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.