Jump to Navigation

018 - To get RSS(XML) data

You can use curl PHP library to get RSS XML data for your aplication. It is a set of routines for making Internet file transfer easier to program.

Example:

$mysession = curl_init('http://rss.cnn.com/rss/cnn_space.rss');
curl_setopt($mysession, CURLOPT_HEADER, false);
curl_setopt($mysession, CURLOPT_RETURNTRANSFER, ture);
$out = curl_exec($mysession);
header("Content-Type: text/xml");
echo $out;
curl_close($mysession);
PHP:


Main menu 2

Story | by Dr. Radut