Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
PHP RSS - Reader, Just got complicated
Old 01-08-2008, 04:06 PM PHP RSS - Reader, Just got complicated
NuWeb.co.uk's Avatar
NuWeb.co.uk is OFFLINE

Posts: 361
Trades: 0
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..
NuWeb.co.uk is offline
Reply With Quote
View Public Profile Visit NuWeb.co.uk's homepage!
 
 
Register now for full access!
Old 01-08-2008, 07:10 PM Re: PHP RSS - Reader, Just got complicated
Ultra Talker

Posts: 251
Location: Belgium, Antwerp, Zoersel
Trades: 0
I'd use PHP SimpleXML. It's not specificly designed for RSS feeds, but works really great!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Orodreth is offline
Reply With Quote
View Public Profile Visit Orodreth's homepage!
 
Old 01-09-2008, 08:49 PM Re: PHP RSS - Reader, Just got complicated
NuWeb.co.uk's Avatar
NuWeb.co.uk is OFFLINE

Posts: 361
Trades: 0
PHP SimpleXML worked great.
thanks mate
__________________

Please login or register to view this content. Registration is FREE


NuWeb 10101101
NuWeb.co.uk is offline
Reply With Quote
View Public Profile Visit NuWeb.co.uk's homepage!
 
Reply     « Reply to PHP RSS - Reader, Just got complicated
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18387 seconds with 12 queries