{"id":27166268,"url":"https://github.com/code-rhapsodie/get-url-contents-ez-twig-bundle","last_synced_at":"2025-04-09T03:39:07.229Z","repository":{"id":56954769,"uuid":"290499950","full_name":"code-rhapsodie/get-url-contents-ez-twig-bundle","owner":"code-rhapsodie","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-10T14:45:59.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-25T05:42:47.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/code-rhapsodie.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":"2020-08-26T13:11:27.000Z","updated_at":"2024-04-25T05:42:47.163Z","dependencies_parsed_at":"2022-08-21T08:50:27.840Z","dependency_job_id":null,"html_url":"https://github.com/code-rhapsodie/get-url-contents-ez-twig-bundle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-rhapsodie%2Fget-url-contents-ez-twig-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-rhapsodie%2Fget-url-contents-ez-twig-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-rhapsodie%2Fget-url-contents-ez-twig-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-rhapsodie%2Fget-url-contents-ez-twig-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-rhapsodie","download_url":"https://codeload.github.com/code-rhapsodie/get-url-contents-ez-twig-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974590,"owners_count":21026742,"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":[],"created_at":"2025-04-09T03:39:06.733Z","updated_at":"2025-04-09T03:39:07.219Z","avatar_url":"https://github.com/code-rhapsodie.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Get Url Contents eZ Twig Bundle\n\nThis bundle adds:\n\n- a `get_url_contents` Twig function\n- a `get_url_contents` eZ Publish legacy template operator\n\nBoth share the same behaviour:\n\n- perform a GET HTTP request to the URL passed as argument, using curl\n- then, if the request succeeded and the response code is 200, return the response body as string\n- otherwise, return an empty string\n\n## Install\n\nJust use Composer:\n\n`composer require code-rhapsodie/get-url-contents-ez-twig-bundle`\n\n## Usage\n\nIn Twig:\n\n```twig\n{{ get_url_contents('https://host/my_external_file.html') }}\n```\n\nIn eZ Publish legacy templates:\n\n```\n{get_url_contents('https://host/my_external_file.html')}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-rhapsodie%2Fget-url-contents-ez-twig-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-rhapsodie%2Fget-url-contents-ez-twig-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-rhapsodie%2Fget-url-contents-ez-twig-bundle/lists"}