{"id":14036800,"url":"https://github.com/willwashburn/mushroom","last_synced_at":"2025-03-23T06:31:23.834Z","repository":{"id":33445264,"uuid":"37090621","full_name":"willwashburn/mushroom","owner":"willwashburn","description":":mushroom: expand links to their final destination","archived":false,"fork":false,"pushed_at":"2019-11-19T19:11:39.000Z","size":59,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T14:52:10.440Z","etag":null,"topics":["bitly","expanding-shortened-urls","php","shorten-urls","shortener","tinyurl","url-shortener"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willwashburn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-08T20:20:14.000Z","updated_at":"2020-03-15T15:11:22.000Z","dependencies_parsed_at":"2022-08-24T14:23:25.743Z","dependency_job_id":null,"html_url":"https://github.com/willwashburn/mushroom","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willwashburn%2Fmushroom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willwashburn%2Fmushroom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willwashburn%2Fmushroom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willwashburn%2Fmushroom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willwashburn","download_url":"https://codeload.github.com/willwashburn/mushroom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245066496,"owners_count":20555402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitly","expanding-shortened-urls","php","shorten-urls","shortener","tinyurl","url-shortener"],"created_at":"2024-08-12T03:02:14.299Z","updated_at":"2025-03-23T06:31:23.499Z","avatar_url":"https://github.com/willwashburn.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"# Mushroom :mushroom: ![CircleCI (all branches)](https://img.shields.io/circleci/project/github/willwashburn/mushroom.svg?style=flat-square) [![Coveralls](https://img.shields.io/coveralls/willwashburn/mushroom.svg?maxAge=2592000\u0026style=flat-square)](https://coveralls.io/github/willwashburn/mushroom) [![Packagist](https://img.shields.io/packagist/dt/willwashburn/mushroom.svg?style=flat-square)](https://packagist.org/packages/willwashburn/mushroom) [![Packagist](https://img.shields.io/packagist/v/willwashburn/mushroom.svg?style=flat-square)](https://packagist.org/packages/willwashburn/mushroom) [![MIT License](https://img.shields.io/packagist/l/willwashburn/mushroom.svg?style=flat-square)](https://github.com/willwashburn/mushroom/blob/master/LICENSE) \nExpand a link.\n\nMushroom finds the final destination of a shortened (or not shortened) url.\n\n\u003e Note: Not for psychedelic drug use\n\n## Usage\n ```PHP\n $mushroom = new Mushroom\\Mushroom();\n\n /// With a single bitly link\n $mushroom-\u003eexpand('bit.ly/xwzfs');\n //// http://www.yourlink.com\n\n /// With an array of links\n $mushroom-\u003eexpand(['bit.ly/1asdf','goog.it/sdfsd','somefulllink.com/foo']);\n /// array http://somebitlylink.com, http://somegooglelink.com, http://somefulllink.com/foo\n \n // Find the canonical url of some link (or set of links)\n $mushroom-\u003ecanonical('http://yourlink.com?utm_param=mushroom');\n // http://www.yourlink.com\n\n```\n\n## Installation\nUse composer\n\n```composer require willwashburn/mushroom```\n\nAlternatively, add ```\"willwashburn/mushroom\": \"~2.11\"``` to your composer.json\n\n## Change Log\n- v2.11.0 - Expose HttpStatusCode for urls when searching canonically\n- v2.10.0 - Add method to add a domain to JS Redirect Domains array\n- v2.9.1 - Fix bug where some html sources were not cached\n- v2.9.0 - Expose HTML for urls when searching canonically\n- v2.8.0 - Only follow JS redirects for whitelisted domains\n- v2.7.0 - Follow some JS redirects\n- v2.6.0 - Add default timeout to curl options\n- v2.5.1 - Add spoofed browser headers to default curl opts\n- v2.5.0 - Ensure that http-refresh redirects have host and scheme\n- v2.4.0 - Follow http-refresh html meta tags\n- v2.3.0 - Ensure that canonical urls have a host\n- v2.2.0 - Ensure that canonical urls have a scheme\n- v2.1.1 - Remove CURLOPT_NOBODY from defaults\n- v2.1.0 - Allow setting curl handle options; set user agent as default \n- v2.0.0 - Stop removing slashes from the end of urls\n- v1.1.0 - Add ability to find canonical url from tags in body of returned page\n- v1.0.0 - Expand multiple links using multi_curl_* for faster responses\n- v0.0.2 - Basic link expanding using curl\n- v0.0.1 - Basic link expanding using \"get_headers\"\n\n## Future Plans\n- \"Polite\" mode to use common link shortening services api's to not count expanding in click counts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillwashburn%2Fmushroom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillwashburn%2Fmushroom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillwashburn%2Fmushroom/lists"}