Skip to content
Browse files

reduced curl code and clarified comment

  • Loading branch information...
1 parent c998049 commit 1698137232198d1aa3ce7ac151dad94d195a6c09 erik committed Nov 17, 2009
Showing with 2 additions and 3 deletions.
  1. +2 −3 standard.php
View
5 standard.php
@@ -6,9 +6,8 @@
$feedUrl = 'http://rss.news.yahoo.com/rss/world';
-//fetch rss xml in a commonly available way
-$ch = curl_init();
-curl_setopt($ch, CURLOPT_URL, $feedUrl);
+//fetch rss xml using curl, which is more commonly available than simplexml_load_file
+$ch = curl_init($feedUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$xmlString = curl_exec($ch);
curl_close($ch);

0 comments on commit 1698137

Please sign in to comment.
Something went wrong with that request. Please try again.