View Full Version : Pausing RSS scroller - replacing fopen with file_get_contents or curl?

07-13-2008, 01:01 AM
1) Script Title:
Pausing RSS scroller

2) Script URL (on DD):

3) Describe problem:

- I got the much dreaded "Sorry: It's not possible to reach RSS file"

- Then I searched this forum and found that it could be related to allow_fopen_url not being enabled on PHP.

- I checked my php config and found that allow_url_fopen is indeed OFF

4) Request:

- Is it possible for the very clever ddadmin to replace fopen with alternatives like file_get_contents or curl?

Apparently, it is very common for web hosting companies to disable fopen for security reasons. So replacing the fopen codes with alternatives will solve the "problem" permanently.

I am only an end-user, so am not clever enough to know what to change and how to change. If ddadmin could do us this favor, it will be GREATLY appreciated.


07-13-2008, 02:49 AM
Just glancing at the code in lastRSS.php, locate the following lines:

function Parse ($rss_url) {
// Open and load RSS file
if ($f = @fopen($rss_url, 'r')) {
$rss_content = '';
while (!feof($f)) {
$rss_content .= fgets($f, 4096);

and replace with the following:

function Parse ($rss_url) {
// Open and load RSS file
$rss_content = file_get_contents($rss_url);

Not tested!

Hope this helps.