I'd like to make a cURL request that accepts a gzip'ed page. I would then like to unzip the page and process it. I haven't been able to find any ready built examples, so I would like a quick one. Any settings that need to be adjusted, making the actual request, and decompressing the contents.
相关问题
- Views base64 encoded blob in HTML with PHP
- Angular RxJS mergeMap types
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
Question duplicated at Uncompress a gzip file from CURL, on php. It says that response can be automatically decoded using
You can request a gzipped encoding with curl_setopt, like this:
You can then decompress the content with gzdecode like this: