Jump to content

Reading RSS and Gzip compression


slowfib

Recommended Posts

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

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);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.