I need a PHP function which will be passed a URL, this URL could be two things which the function will determine:. 1) URL may be a direct link to an RSS Feed for example: [login to view URL] if this is the case, then the script will simply return the URL. or 2) URL may be just the link to the top level site: [login to view URL] If this is the case, then the function will parse that page and find, if it exists, the RSS feed for that site and return the Feed URL. If the RSS feed does not exist or passed an invalid URL (can't be fetched), the function should return false. The function does not need to parse the RSS, I think a valid test would be if it fetches a document and verify the content type looks like a feed then assume it is. If it is HTML, parse and look for feed.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition in the Buyer's environment. 3) Documentation or Instructions on any additional libraries or extra procedures required to run/use the program(s) 4) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
The function must work in PHP 4.3.x The function can/should use cURL Let me know if any additional packages wil be required, this is allowed if necessary.