Hello,
I'm looking to HOOK into VEOH's RSS search feed. This will allow my visitors to search Veoh, and if they find anything go to their site and watch it.
Here is their RSS Feed Url
Searching for 007.
=================================================
The problem arises on my code:
PHP Code:
// include lastRSS include "./lastRSS.php";
// Create lastRSS object $rss = new lastRSS;
// Set cache dir and cache time limit (1200 seconds) // (don't forget to chmod cahce dir to 777 to allow writing) $rss->cache_dir = './temp'; $rss->cache_time = 1200;
if ($rs = $rss->get("http://www.veoh.com/rest/search?contentRatingId=2&numResults=10&offset=0&search=family%20guy")) { foreach($rs['item'] as $item) { $permalinkId = $item["permalinkId"]; $title = $item["title"]; echo '<a href="http://veoh.com/videos/'.$permalinkId.'" target="_blank">'.$title.'</a><br>'; } }
Veoh does not wrap each video in <item> </item>, therefore the code does not work because of this line: foreach($rs['item'] as $item) { .
Any idea how parse the content of the RSS feed?
__________________
Please login or register to view this content. Registration is FREE
NuWeb 10101101
Last edited by NuWeb.co.uk; 01-08-2008 at 04:09 PM..
|