dev-master
9999999-devGuzzle Plugin charset auto encoding
BSD-3-Clause
The Requires
- php >=5.3.3
- diggin/diggin-http-charset dev-master
by sasezaki
guzzle encoding charset goutte
Guzzle Plugin charset auto encoding
A bridge Diggin_Http_Charset & Guzzle3 This plugin enable auto convert charset encoding to UTF-8., (*1)
If you looking for Guzzle4. - https://github.com/sasezaki/guzzle4-charset-subscriber, (*2)
``` php <?php, (*3)
use Diggin\Bridge\Guzzle\AutoCharsetEncodingPlugin\AutoCharsetEncodingPlugin;, (*4)
$autoCharsetEncodingPlugin = new AutoCharsetEncodingPlugin;, (*5)
$client = new Goutte\Client; $client->getClient()->getEventDispatcher()->addSubscriber($autoCharsetEncodingPlugin);, (*6)
$crawler = $client->request('GET', 'http://www.kms.gol.com/benkyo/ben1.htm'); $title = $crawler->filterXpath('//title')->text(); echo $title; // ①文書情報マネジメントとは?, (*7)
```, (*8)
Guzzle Plugin charset auto encoding
BSD-3-Clause
guzzle encoding charset goutte