Php Page Auto Discovery - Help (RSS Detection)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mark_S
Forum Newbie
Posts: 2
Joined: Mon Mar 20, 2006 8:32 am

Php Page Auto Discovery - Help (RSS Detection)

Post by Mark_S »

Hi everyone,
My first post, as ive just found you :)

----------------------
I have searched and search, but i'm not getting anywhere?

I have a .php page with php coding etc.

The problem that i have is that i wish to make it "Auto Discover" with
an RSS Reader.

I can do this using a .html page and it works.

Code: Select all

<link rel="alternate" 
type="application/rss+xml" 
title="RSS Feed for ..............." href="rss10.xml"/>
But i can not get it to "Auto Discover" with a .php page.

-----------------------------
I have searched extensivly with out any success,
except for this page http://keithdevens.com/weblog/archive/2 ... scoveryPHP

But i dont fully understand what's actually happing?
Is the code on that page Auto Discovery code?

If so i cant get it to work?
I'm not sure how to call the function to get it to work.

Any help or advice would be very much appreciated,
and i'm sure this would help other as i just cant find an answer.
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

This works for me

Code: Select all

<link rel="alternate" title="Name of site" href="rss.php" type="application/rss+xml">
Mark_S
Forum Newbie
Posts: 2
Joined: Mon Mar 20, 2006 8:32 am

Post by Mark_S »

Appoligies for the late reply, i had to do some testing.
As the example above worked but mine didnt ?

And i came to the following conclusions / results.

My page should "Auto Discover" x2 feeds.
Using the code above from "Pimptastic"

Code: Select all

<link rel="alternate" title="Name of site" href="rss.php" type="application/rss+xml">
I got one to work but why wouldnt mine work?

This is an example of 1 that works and 1 that doesnt.

This does Not Auto Discover?

Code: Select all

Example 1 Does Not Work.
<link rel="alternate" type="application/rss+xml" title="RSS2 Feed mysite.com" href="http://www.mysite.com/29/rss10.xml"/>
This does Auto Discover?

Code: Select all

Example 2 Does Work.
<link rel="alternate" type="application/rss+xml" title="RSS2 Feed mysite.com" href="http://mysite.com/28/rss10.xml"/>
So why does one work and not the other?

Answer Remove the www. from the link.

It was as simple as that and just as frustrating.

Its also worth noting that i found that if 2 links were the same only 1 would "Auto Discover"
Regardless if the title="was diffrent" than the other.

Another frustration was by refreshing or CTRL+F5 (Refresh)
Did not invoke the Auto Discovery, the page had to be opened as fresh again.

I'm testing this with a program for my desk top called Newz Reader.

I hope the above helps others making php pages Auto Discoverable.

------------------------
I now need to look up caching my results to speed up the
display of my RSS Pages as it can Stall on occasion.
I will start a new topic.

Thanks for your help Pimptastic
Post Reply