Go Back   Dynamic Drive Forums > DD Scripts > Dynamic Drive scripts help
Search Dynamic Drive Forums:

Reply
 
Thread Tools Search this Thread
  #1  
Old 07-13-2008, 02:01 AM
rebelfighter rebelfighter is offline
New Comer (less than 5 posts)
 
Join Date: Jul 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Arrow Pausing RSS scroller - replacing fopen with file_get_contents or curl?

1) Script Title:
Pausing RSS scroller


2) Script URL (on DD):
http://www.dynamicdrive.com/dynamici...ller/index.htm


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.

THANKS!
Reply With Quote
  #2  
Old 07-13-2008, 03:49 AM
thetestingsite's Avatar
thetestingsite thetestingsite is offline
The Guy That Moderates
 
Join Date: Sep 2006
Location: St. George, UT
Posts: 2,795
Thanks: 3
Thanked 156 Times in 154 Posts
Default

Just glancing at the code in lastRSS.php, locate the following lines:

Code:
	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);
			}
			fclose($f);
and replace with the following:

Code:
	function Parse ($rss_url) {
		// Open and load RSS file
$rss_content = file_get_contents($rss_url);
Not tested!

Hope this helps.
__________________
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
The Testing Site | Atomic Yeti
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:23 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.