Skip to content

Instantly share code, notes, and snippets.

@heathdutton
Created August 18, 2011 17:14
Show Gist options
  • Save heathdutton/1154555 to your computer and use it in GitHub Desktop.
Save heathdutton/1154555 to your computer and use it in GitHub Desktop.
// ...[curl code]...
$info = curl_getinfo($ch);
curl_close($ch);
$header = substr($response, 0, $info['header_size']);
$body = substr($response, -$info['download_content_length']);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment