Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Sep 17, 2011 5:21 pm 
Offline

Joined: Sat Sep 17, 2011 5:14 pm
Posts: 1
Hi,
I'm trying to read an rss feed with simplexml_load_file(). But on my Linode server (not with my local server) there is a problem with URL scheme.

If I try this as the source file: "http://www.domain.com/rss" it reads file just fine. But if I change URL to this: "http://www.domain.com/?feed=rss" it doesn't.

As I said there is no problem with both URLs on my development server. What could be the problem?


Top
   
 Post subject:
PostPosted: Mon Sep 19, 2011 11:02 am 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
I'm not sure if http://www.domain.com/?feed=rss is technically a valid URL (even if it works). Try specifying the filename:

http://www.domain.com/whatever.php?feed=rss


Top
   
 Post subject:
PostPosted: Mon Sep 19, 2011 5:15 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Guspaz wrote:
I'm not sure if http://www.domain.com/?feed=rss is technically a valid URL (even if it works). Try specifying the filename:

http://www.domain.com/whatever.php?feed=rss


RFC 3986 says it's cool... //www.domain.com/ is the hier-part, and ?feed=rss is the query. If http://www.domain.com/ works, then http://www.domain.com/?feed=rss should work. Whether it does the right thing is an implementation question...

What does http://www.domain.com/?feed=rss do instead of working, and why does http://www.domain.com/rss (which is a completely different object, with hier-part //www.domain.com/rss) work?

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Mon Sep 19, 2011 5:26 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Are you applying urlencode() to the URL by any means? That would screw up the question mark.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group