simbor / google-api-adwords-php

Automatically exported from code.google.com/p/google-api-adwords-php
Apache License 2.0
0 stars 0 forks source link

GZIP in report download. #65

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I noticed that the report download code has been updated over time to include 
support for returning a report rather than just storing it to a file. Was just 
thinking it would be good to include some support for GZIP out of the box. 

There is a curl option that does this but I didn't have a lot of luck with it. 
There is a gzdecode PHP function that would work but I don't think it is in 
anything but the latest alpahas and I was running a PHP based implementation of 
this for a while but was a bit slower given it's really a low level operation. 

Currently I use gzinflate:
$reportXML = gzinflate(substr($reportXML_gzip,10,-8));
Without knowing to much about the gzip process I assume gzinflate is pretty 
much the same as gzdecode apart from some some headers/ footers on the data.

Just some thoughts, good to see the 32bit id issue fixed, looks like a nice 
implementation.
Rob. 

Original issue reported on code.google.com by rob...@gmail.com on 18 Aug 2011 at 3:22

GoogleCodeExporter commented 8 years ago
I've enabled gzip support in CurlUtils, which is used by ReportUtils. The 
report will be gzipped over the wire, but written as plain text in the string 
or file. See r199.

Original comment by ekoleda+devrel@googlers.com on 18 Aug 2011 at 7:27