473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PHP Validate URL is RSS site or Not

Respected Sir/madam,

I will allow users to enter Address URL in my Application.But i want to validate that Address URL is an RSS webSite or Not.

when user enter html or php website(www.google.com,www.yahoo.com) Address URL.i need to display error message.i need to store in my DB only if the Address URL belong to RSS Site(http://rss.cnn.com/rss/edition.rss)

i can't able to differentiate by using the extensions,some RSS sites end with .rss and some may not.

One clue i have is that RSS website is an XML Site.But i don't know how to achieve this result.

I am looking forward some help.

A.Suresh
Dec 21 '07 #1
1 3376
pbmods
5,821 Expert 4TB
Heya, Suresh.

If you are using cURL to fetch the RSS data, set the CURLOPT_HEADER option and then parse the response's Content-type header.

You're looking for text/xml, application/rss+xml, application/rdf+xml or application/atom+xml.
Dec 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Steve | last post by:
Hi, I have the below line in every page of a site, to set up the top section of the page: <table width="100%" cellspacing="0" cellpadding="0" background="images/index_topstrip.gif">
5
by: Dave | last post by:
Hello. Is there any method to validate if string contains valid IP address? I also need the method to valideta email address in string. Thank you.
3
by: Wm. Scott Miller | last post by:
Hello all: I'd like some advice on the best way to validate and confirm an e-mail address entered during a registration process. What we are thinking of is something like the following: 1. ...
5
by: sjl | last post by:
I've got an .aspx webform for searching my database. It basically takes user input and passes it as a parm into a stored proc to search a table. The results are returned in a SQLDataReader and...
0
by: James Crowley | last post by:
Hi everyone, My site is randomly firing off a "ExceptionHttpException : Unable to validate data. " error on some of its forms at the moment: ------- HttpException : Unable to validate data....
7
by: James Crowley | last post by:
Hi everyone, My site is randomly firing off a "ExceptionHttpException : Unable to validate data. " error on some of its forms at the moment: ------- HttpException : Unable to validate data....
5
nathj
by: nathj | last post by:
Hi, I have been looking around the forum and the web for a way to achieve this and so far I have drawn a blank. So I head to the forum as I'm sure someone knows how to do this. I have a form...
10
by: kelvin | last post by:
Hi, A difficult question. I have a form that I used to submit to https://www. paypal.com/cgi-bin/ webscr <form action="https://www. paypal.com/cgi-bin/webscr" method="post"> Now I need to...
1
by: mbarnhizer | last post by:
Hello All, Trying to figure out how to validate a series of questions on an online test. I am thinking that VB or Javascript is the best route, but your input may make a difference. The site i...
4
by: ghjk | last post by:
I want to validate my php site. I created javascript file for the validate functions. Eg: function validateFormOnSubmit(theForm) { var reason = ""; reason +=...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.