Deoctor Posted November 23, 2009 Share Posted November 23, 2009 Hai i am using the curl option to validate the site for the rss feed. my code is <?php // create a new cURL resource $ch = curl_init(); $demo='http://chaitu09986025424.blog.co.in/feed/rss/'; // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://validator.w3.org/feed/check.cgi?url=$demo"); curl_setopt($ch, CURLOPT_HEADER, false); // grab URL and pass it to the browser curl_exec($ch); echo $info['http_code'] . " " . $http_codes[$info['http_code']]; // close cURL resource, and free up system resources curl_close($ch); ?> now the problem is that how do i read the file and pass the parameters... the result of this would be Congratulations! This is a valid RSS feed. Recommendations This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations. •line 11, column 107: Self reference doesn't match document location [help] ... rel="self" type="application/rss+xml" /> ^Source: http://chaitu09986025424.blog.co.in/feed/rss/ 1.<?xml version="1.0" encoding="UTF-8"?> 2.<rss version="2.0" 3.xmlns:content="http://purl.org/rss/1.0/modules/content/" 4.xmlns:wfw="http://wellformedweb.org/CommentAPI/" 5.xmlns:dc="http://purl.org/dc/elements/1.1/" 6.xmlns:atom="http://www.w3.org/2005/Atom" 7.> 8. 9.<channel> 10.<title>Chaitu's</title> 11.<atom:link href="http://chaitu09986025424.blog.co.in/wp-rss2.php" rel="self" type="application/rss+xml" /> 12.<link>http://chaitu09986025424.blog.co.in</link> 13.<description>Know about the World and gain some Knowledge</description> 14.<pubDate>Fri, 20 Nov 2009 11:18:56 +0000</pubDate> how do i pass the This is a valid RSS feed. data in code so that i can validate the given url.. please some body help me on this.. Link to comment https://forums.phpfreaks.com/topic/182616-how-to-use-curl-option/ Share on other sites More sharing options...
Garethp Posted November 23, 2009 Share Posted November 23, 2009 <font color="green">This is a valid RSS Feed</font> In my opinion, if you don't know that, then you don't really have any business coding PHP. A person should always know HTML and Javascript before PHP Link to comment https://forums.phpfreaks.com/topic/182616-how-to-use-curl-option/#findComment-963840 Share on other sites More sharing options...
Deoctor Posted November 23, 2009 Author Share Posted November 23, 2009 boss what is wanted is not to display this in some colors or stuff. how do i pass this one to a variable and scan the result for a particular keyword.. i dont think there is any thing that is related to html in this.. Link to comment https://forums.phpfreaks.com/topic/182616-how-to-use-curl-option/#findComment-963842 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.