Can anyone tell me why this php code is not pulling the righ

Any problem with PHP can be disscused here
Post Reply
pryj
Posts: 56
Joined: Tue Dec 21, 2004 1:06 pm

Can anyone tell me why this php code is not pulling the righ

Post by pryj »

PHP Code:
require_once './rss/rss_fetch.inc';

$url = 'http://www.****.com/forum/e ... 8,17,23,27' ;
$rss = fetch_rss($url);

if ( $rss and !$rss->ERROR) {
foreach ($rss->items as $item ) {
echo ' <table class="tborder" cellspacing="0" cellpadding="3" width="100%">';
echo ' <tr> ';
echo ' <td class="thead"> ';
echo ' ' . $item[title] . ' ';
echo ' </td> ';
echo ' </tr> ';
echo ' <tr> ';
echo ' <td class="tcat"> ';
echo ' . ]Discuss this topic on our Political Forums ';
echo ' </td> ';
echo ' </tr> ';
echo ' <tr> ';
echo ' <td class="alt1"> ';
echo ' ' . $item[description] .' ';
echo ' </td> ';
echo ' </tr> ';
echo ' </table>
';

// echo '

. ]' . $item[title] . '<br / >';
// echo 'Publish Date: ' . $item[pubdate] . ' <br / >';
// echo $item[ description ] . ' </p>' ;
}
} else {
echo 'RSS Error: ' . $rss->ERROR . ' <br / >
' ;
}


It outputs the image below.

Should it not output the thread content?


mohumben
Posts: 82
Joined: Thu Sep 15, 2005 9:45 pm

Post by mohumben »

It helps if you post which script you are using. post the file "rss/rss_fetch.inc"
It doesn't seems you have coded the RSS Fetcher.

A side note, you don't have to write echo EVERY new line.
D0M1N0R
Posts: 91
Joined: Tue Sep 20, 2005 8:05 pm

Post by D0M1N0R »

LOL!!!

Thats a funny bunch of PHP code,
1st of all, you kinda need to post loation of files and so on, for people to tell why it dont work, if that was the only fault.
2nd your coding.....No bad intentions with this but..Its a mess :)
3rd, if your using this on a website, where are your <?php ?> enclosement tags?
toychoq
Posts: 108
Joined: Fri Apr 15, 2005 9:11 am

Post by toychoq »

what u mean by righ?
kaos_frack
Posts: 504
Joined: Sat May 07, 2005 8:03 am
Contact:

Post by kaos_frack »

you better first tell what you want to achieve with this script.
then ask why it isn't working
Post Reply