slowfib Posted May 22, 2010 Share Posted May 22, 2010 So what I'm after is very simple. I'm trying to retrieve this RSS page: http://rss.binsearch.net/rss.php?max=50&g=alt.binaries.multimedia My problem is, when I use PHP to directly pull it, I get the following error: http://www.binsearch.info/ Due to excessive data traffic usage, using RSS clients that do not support (gzip) compression is no longer allowed! If you integrated any feeds into your own site and need assistence with implementing gzip support, contact us!<p>Regards,<br>Binsearch team Sat, 01 Oct 2005 07:02:27 GMT 86400 I've done plenty of digging on gzip and understand now that web browsers have it built in that if a page is compressing the data, the browser will retrieve it, uncompress it and display normally. Any ideas on how I pull the data correctly with PHP? Right now, all I'm doing is this: <?php $results = file_get_contents("http://rss.binsearch.net/rss.php?max=50000&g=alt.binaries.multimedia"); echo $results; ?> Thank you! Link to comment https://forums.phpfreaks.com/topic/202606-reading-rss-and-gzip-compression/ Share on other sites More sharing options...
Mchl Posted May 22, 2010 Share Posted May 22, 2010 Try using curl to fetch this content and attach Accept-Encoding header to your request. Link to comment https://forums.phpfreaks.com/topic/202606-reading-rss-and-gzip-compression/#findComment-1062035 Share on other sites More sharing options...
slowfib Posted May 22, 2010 Author Share Posted May 22, 2010 Curl is exactly what i was looking for! Thanks for the help Mchl! This worked perfectly: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http://rss.binsearch.net/rss.php?max=50000&g=alt.binaries.multimedia"); curl_setopt($ch, CURLOPT_ENCODING , "gzip"); curl_exec($ch); echo $ch; curl_close($ch); Link to comment https://forums.phpfreaks.com/topic/202606-reading-rss-and-gzip-compression/#findComment-1062073 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.