I'm trying to call the Stack Exchange API but it sends compressed JSON strings and I can't uncompress it.
$request = drupal_http_request('https://api.stackexchange.com/2.2/users?order=desc&sort=reputation&site=stackoverflow');
$uncompressed = gzinflate($request->data);
$json_response = drupal_json_decode($uncompressed);
I'm getting an error like this: Warning: gzinflate(): data error in adventure_profile_profile() (line 104 of /home/justine/www/adventure/sites/all/modules/custom/adventure_profile.module).
(where line 104 is $uncompressed = gzinflate($request->data);
).
Am I doing something wrong?