Our blog
Curl 404 but Fine in Browser + Solution
I just hit an intriguing situation where a page that was perfectly viewable in my browser was not visible via curl.
I scratched my head and messed around testing the page in variety of online proxy services and local web browsers. I even stared messing about with telnet and manually typing headers. My conclusion was that the simpler systems such as text based browsers were not able to see the page and were instead given a 404 message.
However better more modern browsers could see the page. Likewise the page was visible in the Google cache and aso Google Translate.
In the end I downloaded a neat little firefox add-on called Tamper Data. This allows you to tweak your request headers before they are submitted. 5 minutes later I realised that it was the Gzip compatibility which was causing the issue.
Curl (being the awesome tool that it is) can handle Gzip compression, but I wasn't using it. I have now added the following line to my curl function and I am pulling pages fine.
-
curl_setopt($go,CURLOPT_ENCODING , $compression);
-
}
More...
WavyBrainy » Naked HTML: Designers Glorify Error 404 Pages
Smart 404 Pages « Dan Raine
SceneDDL » Speak Low-Hands Up-2009-404
404 Tech Support » MonitorES - Monitor Energy Saver
[$49.99] Rip Curl Core 2/2 XBack Springsuit ShortSleeve Women`s by ...
daniel.haxx.se » curl 7.19.5
HansenSurf Blog » » Rip Curl WLP Fanning Signature Boardshort
cURL or libcurl for the app?? Noob doubts.. « Ankur's Fedora Blog
Compression Tools: lzma, bzip2 & gzip | Ekrem SEREN's Weblog
Multi-threaded gzip | Geek Style
GZip files with .htaccess and PHP
GZip compression is not part of AMF! | Wade Arnold
Fix for IE6 and gzip compressed javascripts | Freelance Web ...
RSS Feed