Skip to content

Instantly share code, notes, and snippets.

@adrienbrault
Created April 8, 2013 16:40
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrienbrault/5338309 to your computer and use it in GitHub Desktop.
Save adrienbrault/5338309 to your computer and use it in GitHub Desktop.
Download a file using guzzle
<?php
$client = ...;
$response = $client->get('http://guzzlephp.org/index.html', null, tmpfile())->send();
$response->getStream(); // Magic comes after
@000panther
Copy link

This one does not work anymore with the current Guzzle distribution ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment