Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3509
I've been thanked 37 times.
Offline
two aspects - this applies only to Googles news feeds (they had a similar one recently about google earch results
the other is the date on the article
Member
From: Ohio USA
Registered: 2004-11-17
Posts: 670
I've been thanked 0 times.
Offline
I got an email from google saying I could not put their news feed on my website, but they don't have a problem if I copy and paste it to my site. This was probably over a year ago.
Member
From: Wilmington, N.C.
Registered: 2006-04-05
Posts: 14
I've been thanked 0 times.
Offline
yeah I think Google has since changed their tune on the whole RSS thing:
Terms of use
We invite you to make noncommercial use of Google's RSS and Atom feeds on your website subject to these terms, Google's Terms of Service, and the Google News Terms of Service. If you incorporate our feeds onto your website, please also:
1. attribute the feeds to Google News.
2. attribute each news item to its provider, using the provider name as it appears in the Google News feed.
3. include a link to the Google News cluster of related articles for each news item, using the link provided in the Google News feed.
4. identify the search terms used to generate the feed.
We reserve all rights in and to the Google and Google News marks. We also reserve the right to terminate any use of the feeds on grounds that we deem appropriate. You may not redistribute Google's feeds.
However I guess their rules are sort of vague....and I'm not really sure how I'd go about complying to some of those demands but I think they'll be fine with it as long as it is a non commerical site.
Its a funny time to learn to swim when you start to drown.
Trying to use the SimpleReader.php and get an error. this was discussed already in the Forum, but the page that is supposed to explain how to fix the problem is no longer available.
These are the files used
http://gymnasticszone.com/SimpleReader.php
http://gymnasticszone.com/GymNews.htm
This is the error:
Warning: fopen(481c5c44baa69a2965a0aaa34006e429): failed to open stream: Permission denied in /home2/gymzone/gymnasticszone-www/SimpleReader.php on line 113
Warning: fwrite(): supplied argument is not a valid stream resource in /home2/gymzone/gymnasticszone-www/SimpleReader.php on line 114
Warning: fclose(): supplied argument is not a valid stream resource in /home2/gymzone/gymnasticszone-www/SimpleReader.php on line 115
Also tried putting it in a Scripts folder, but I don't apparently know how to set the path to it.
I swear I'm not trying to be a pain, but is there anyway to modify the following:
Code:
$rss_feed = file_get_contents($rss_url);
With the cURL attribute so this script works on hosts that has disabled file_get because of security issues? You can see the error on this test page: http://www.boothreview.com/test.php
Member
From: Pell City, Alabama USA
Registered: 2004-11-17
Posts: 2084
I've been thanked 5 times.
Offline
cagedecay wrote:
I swear I'm not trying to be a pain, but is there anyway to modify the following:
Code:
$rss_feed = file_get_contents($rss_url);With the cURL attribute so this script works on hosts that has disabled file_get because of security issues? You can see the error on this test page: http://www.boothreview.com/test.php
What is "the cURL attribute" ?
TombOfTheMutilated.NET - Destroying The Minds of America's Youth Since 2001
Well I don't know if "attribute" is the right word (maybe "function"?), but here is Dreamhost's explanation:
http://wiki.dreamhost.com/index.php/CURL
and here is more info on php.net:
http://us2.php.net/manual/en/ref.curl.php
I tried replacing this myself, but I really know nothing about PHP so of course it didn't work. From what I've read its just a more secure means of getting the contents of a URL. Any help would be appreciated ... I already have your script running perfectly on another host. Thanks.
Member
From: Pell City, Alabama USA
Registered: 2004-11-17
Posts: 2084
I've been thanked 5 times.
Offline
OK, now I have not tried this but based on my reading of the PHP page with the CURL info, it would seem that this would be a good replacement for file_get_contents()
Code:
//
// Do not change the source code of the reader unless you are unable to use
// file_get_contents()
//
// Now we read the feed
//$rss_feed = file_get_contents($rss_url);
// Now we read the feed CURL version
$handle = curl_init($rss_url);
$rss_feed = curl_exec($handle);
$rss_feed = implode($rss_feed);
I have no idea if it works or not
TombOfTheMutilated.NET - Destroying The Minds of America's Youth Since 2001
Well, it's doing something: http://www.boothreview.com/test.php
It seems to parse a bunch of headlines, throw an error about an array and then give the default.
Member
From: Pell City, Alabama USA
Registered: 2004-11-17
Posts: 2084
I've been thanked 5 times.
Offline
cagedecay wrote:
Well, it's doing something: http://www.boothreview.com/test.php
It seems to parse a bunch of headlines, throw an error about an array and then give the default.
hmmm maybe delete this part ?
$rss_feed = implode($rss_feed);
TombOfTheMutilated.NET - Destroying The Minds of America's Youth Since 2001
Better ... http://www.boothreview.com/test.php
The error is gone but it doesn't seem to parse correctly. All its doing is importing the RSS feed without converting to HTML. Simply view source to see what I'm talking about. It's not a big deal if you don't want to mess with it.
Getting a different error - but were you seeing just plain HTML?
Today's article: A Unique Look at Adwords Advertising
Member
From: Sydney, Australia
Registered: 2004-10-23
Posts: 593
I've been thanked 0 times.
Offline
eltaito wrote:
We invite you to make noncommercial use of Google's RSS and Atom feeds on your website subject to these terms, Google's Terms of Service, and the Google News Terms of Service. If you incorporate our feeds onto your website, please also:
1. attribute the feeds to Google News.
2. attribute each news item to its provider, using the provider name as it appears in the Google News feed.
3. include a link to the Google News cluster of related articles for each news item, using the link provided in the Google News feed.
4. identify the search terms used to generate the feed.
We reserve all rights in and to the Google and Google News marks. We also reserve the right to ter
That's why I don't use Google RSS News feeds. I use Yahoo, MedicineNet.com, and a couple of article sites for articles etc.
(Besides - SR's Parser won't do Google Feeds!!???.....) 
Wiz 
I cried because I had no shoes - until I saw a man who had no feet...
New member
From: Czech Republic
Registered: 2006-04-12
Posts: 1
I've been thanked 0 times.
Offline
Looks like a great site feature. Having this difficulty.
Warning: file_get_contents(): URL file-access is disabled in the server configuration in [my directory with the php file] on line 54
I assume this means I need to talk with my service provider?
kevin
Yup - if you read through some of the posts here you will find some other people had this problem. I don't know if a solution was formed using cURL or not, but that was the proposed solution.
Today's article: A Unique Look at Adwords Advertising
How can I change the script so the feeds will include pictures?
Member
From: Pell City, Alabama USA
Registered: 2004-11-17
Posts: 2084
I've been thanked 5 times.
Offline
That shouldn't be too hard.
If the picture is in the <description> node as an <img> tag you don't have to do anything.
But pictures are sometimes in the <enclosure> node, so if you know that is where the picture is I can show you how to parse it out.
TombOfTheMutilated.NET - Destroying The Minds of America's Youth Since 2001
Well I have just read the whole of this thread and I am still unsure what my error means?
I get the following message -
Warning: file_get_contents(http://newsrss.bbc.co.uk/rss/newsonline … /rss.xml#/): failed to open stream: Permission denied in /freeola/users/1/8/sr0388381/htdocs/rssfeed/newrss.php on line 54
Now when I run this locally works great, so either I have not setup something correctly or my provider has disabled this function.
Any advice would be appreciated.
Member
From: Pell City, Alabama USA
Registered: 2004-11-17
Posts: 2084
I've been thanked 5 times.
Offline
or my provider has disabled this function.
probably so
Sorry - really no advice I can give you other than talk to your host or get another host
TombOfTheMutilated.NET - Destroying The Minds of America's Youth Since 2001
Here's one I haven't seen in this thread yet. Any help would be appreciated.
The parsing works fine, but I'm having a problem when it retrieves the cached feed. Because my include statement is in the middle of my index.php page, when it executes the following code to get the cached version, the exit() statement is causing the rest of the page to stop rendering. When I view source with this problem - the code litterally stops at "<!-- END OF RSS FEED ENTRY -->"
Code: php
$ttl = 60*60;// 60 secs/min for 60 minutes = 1 hour(360 secs)
$cachefilename = md5($rss_url);
if (file_exists($cachefilename) && (time() - $ttl < filemtime($cachefilename))) {
// We recently did the work, so we'll save bandwidth by not doing it again
include($cachefilename);
exit();
}
I have narrowed it down to the exit() call by commenting out just that statement and the page then displays the feed twice (first the cached version, then the parsed version) and the rest of the page renders just fine. In the mean time, I have commented out that entire snippet of code that calls the cached version just so it would render properly, but I would really like to get the caching to work.
The working version with the cache commented out is www.vividdigitaltech.com (you can see the whole page here)
The non-working version with the cache enabled is http://www.vividdigitaltech.com/rssproblem.php (you can see how the code just stops and the rest of the page is never rendered)
Any ideas?
Thank you,
Nicole
| Never |


