Skip to content

Instantly share code, notes, and snippets.

@kesselb
Created March 9, 2020 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kesselb/34a522300f9e1ad772241b4cda66bb85 to your computer and use it in GitHub Desktop.
Save kesselb/34a522300f9e1ad772241b4cda66bb85 to your computer and use it in GitHub Desktop.
Minimal working example to reproduce a guzzle issue with rss.kicker.de/news/2bundesliga
<?php
require_once __DIR__ . '/vendor/autoload.php';
$stream =
$client = new GuzzleHttp\Client([
//'handler' => new \GuzzleHttp\Handler\CurlHandler(), // body size: 0
'handler' => new \GuzzleHttp\Handler\StreamHandler(), // body size: 25965
]);
$response = $client->get(
'http://rss.kicker.de/news/2bundesliga',
[
'debug' => true,
]
);
echo 'Status code: ' . $response->getStatusCode() . "\n";
echo 'Body size: ' . $response->getBody()->getSize() . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment