Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

   

Reply
 
LinkBack Thread Tools Display Modes
Old 02-02-2005, 05:25 PM   #1 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
Feed doesn't show up?

http://www.must-have-software.net/1.php

How come my feed won't show up? It feeds off of results from Yahoo and I have one for MSN too but it wont work? What gives? Anyone have any other RSS code I could use?

Last edited by Pimpen 2010 : 02-02-2005 at 05:47 PM. Reason: Title mispelling
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-02-2005, 05:28 PM   #2 (permalink)
Possible Terrorist
 
kwvarga's Avatar
 
Join Date: 10-13-03
Location: Tuscaloosa, AL or Atlanta
Posts: 4,904
iTrader: 0 / 0%
Latest Blog:
A+ Certification

kwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web prokwvarga is a highly respected web pro
Send a message via AIM to kwvarga
Code:
<tr> <td valign="top"><center><img src="images/newshead.jpg" align="middle"></center></td> </tr> <tr> <td valign="top"> <hr width="100%" align="center" size="1"> </td> </tr> <tr> <td valign="top"> This is the lastest software and freeware news. If you would like to read the archives of this section, please visit the <a href="/forum/viewforum.php?f=45">News Forum</a>. </td> </tr>
cuz their is nothing in the code to show it?
__________________
Kyle Varga
"m3lt/theSpear"
student, web designer/coder, future IT consultant
Experience: PHP/MySQL, Java, C++, MS-SQL
kwvarga is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-02-2005, 05:38 PM   #3 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
Naw, there is, here's the code from the page:

Code:
<?php include ('includes/connect.php'); $page_title = "Software & Freeware Downloads"; include ('includes/header.php'); include ('includes/leftside.php'); ?> <td width="570" valign="top"><!--old width was 380 !--> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <table width="100%" border="0" cellpadding="3" cellspacing="0"> <tr> <td valign="top"><center><img src="images/newshead.jpg" align="middle"></center></td> </tr> <tr> <td valign="top"> <hr width="100%" align="center" size="1"> </td> </tr> <tr> <td valign="top"> This is the lastest software and freeware news. If you would like to read the archives of this section, please visit the <a href="/forum/viewforum.php?f=45">News Forum</a>. </td> </tr> <tr> <td valign="top"> <hr width="100%" align="center" size="1"> </td> </tr> <tr> <td valign="top"> <table cellpadding="2"> <td bgcolor="E5EEF8" width="650"> <div align="justify"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"> <? $xml_file = "http://news.search.yahoo.com/news/rss?p=Software+Reviews&ei=UTF-8&fl=0&x=wrt";//change this to whatever news feed you want to use $open_tags = array( "ARTICLE" => "<ARTICLE>", "HEADLINE_TEXT" => "<HEADLINE_TEXT>", "URL" => "<URL>", "HARVEST_TIME" => "<HARVEST_TIME>", "SOURCE" => "<SOURCE>"); $close_tags = array( "ARTICLE" => "</ARTICLE>", "HEADLINE_TEXT" => "</HEADLINE_TEXT>", "HARVEST_TIME" => "<HARVEST_TIME>", "URL" => "</URL>", "SOURCE" => "</SOURCE>"); $count=0; function startElement($parser, $name, $attrs=""){ global $open_tags, $temp, $current_tag; $current_tag = $name; if ($format = $open_tags[$name]){ switch($name){ default: break; } } } function endElement($parser, $name, $attrs=""){ global $close_tags, $temp, $current_tag, $count, $numstors; if ($format = $close_tags[$name]){ switch($name){ case "ARTICLE": return_page($temp); $temp = ""; break; default: break; } } } function characterData($parser, $data){ global $current_tag, $temp, $catID; switch($current_tag){ case "HEADLINE_TEXT": $temp["head"] = $data; $current_tag = ""; break; case "URL": $temp["url"] = $data; $current_tag = ""; break; case "SOURCE": $temp["source"] = $data; $current_tag = ""; break; case "HARVEST_TIME": $temp["time"] = $data; $current_tag = ""; break; default: break; } } function return_page(){ global $temp, $count; $temp["time"] = preg_replace ("/AM/", " a.m.", $temp["time"]); $temp["time"] = preg_replace ("/PM/", " p.m.", $temp["time"]); echo "<a href=\"".$temp["url"]."\" target=\"_blank\">".$temp["head"]."</a>\n<br>\n"; echo "[".$temp["source"]."] - ".$temp["time"]."\n<br>\n<br>\n\n"; } $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement","endElement"); xml_set_character_data_handler($xml_parser, "characterData"); if (!($fp = fopen($xml_file, "r"))) { die("Could not open $xml_file for parsing!\n"); } while ($data = fread($fp, 4096)) { if (!($data = utf8_encode($data))) { echo "ERROR"."\n"; } if (!xml_parse($xml_parser, $data, feof($fp))) { die(sprintf( "XML error: %s at line %d\n\n", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } } xml_parser_free($xml_parser); ?></font> </div> </td> </table> </td> </tr> </table> </td> <?php include ('includes/footer.php'); ?>
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-03-2005, 08:11 AM   #4 (permalink)
Contributing Member
 
Join Date: 05-02-04
Posts: 142
iTrader: 0 / 0%
Latest Blog:
None

notepage is just really nicenotepage is just really nicenotepage is just really nicenotepage is just really nicenotepage is just really nicenotepage is just really nicenotepage is just really nicenotepage is just really nice
displaying RSS using PHP

There is a free PHP script at http://www.feedforall.com/free-php-script.htm that is really easy to use. You simply create a template and the script dynamically updates.
HTH
notepage is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-03-2005, 09:13 AM   #5 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,946
iTrader: 0 / 0%
Latest Blog:
None

imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
Looks like the RSS schema changed by looking at the source (rss) file.

http://news.search.yahoo.com/news/rs...F-8&fl=0&x=wrt

It also looks like yahoo commented out their TITLE and DESCRIPTION fields. It only returns the link but no title or description.

Here is what I am talking about.

http://www.imaginecreativeservices.com/yahoofeed.php

If this is a permanent change you will need to do a string replace/remove of the extra "comments" code (<![CDATA[ ) and (]]>). My sample page does NOT do this.

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-03-2005, 01:26 PM   #6 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
What about the MSN one?

I'll check that out notepage
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-03-2005, 01:32 PM   #7 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,946
iTrader: 0 / 0%
Latest Blog:
None

imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
What's the link to the rss or xml file?

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-03-2005, 01:38 PM   #8 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
http://beta.search.msn.com/results.a...ews&format=rss

I think this one is more in detail but this one didn't work either (using the same code above but with this link)
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-03-2005, 02:17 PM   #9 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,946
iTrader: 0 / 0%
Latest Blog:
None

imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
It works for me.

http://www.imaginecreativeservices.com/msnfeed.php

Here is the code I used.

Code:
<?php $source = "http://beta.search.msn.com/results.aspx?q=Software+Reviews&format=rss"; $xmlfile = fopen($source, "r"); if(!$xmlfile)die("cannot open the xml file"); $readfile = fread($xmlfile ,40000); $searchfile = eregi("<item>(.*)</item>", $readfile ,$arrayreg); $filechunks = explode("<item>", $arrayreg[0]); $count = count($filechunks); echo "<table>"; for($i=1 ; $i<=$count-1 ;$i++) { ereg("<title>(.*)</title>",$filechunks[$i], $title); ereg("<link>(.*)</link>",$filechunks[$i], $links); ereg("<pubDate>(.*)</pubDate>",$filechunks[$i], $pubDate); ereg("<description>(.*)</description>",$filechunks[$i], $description); echo "<tr><td>"; echo "<a href ='$links[1]'\>$title[1]</a><BR><span class=body>Description: $description[1]</span><BR><BR>"; echo "</td></tr>"; } echo "</table>"; $xmlfile = ""; $readfile = ""; $searchfile = ""; $filechunks = ""; $count = ""; $source = ""; $i = ""; $links = ""; $title = ""; ?>
imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-03-2005, 04:05 PM   #10 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
Thanks.

Those boxes you have one yours wont show up on mine right?
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-03-2005, 05:21 PM   #11 (permalink)
v7n Mentor
 
imaginemn's Avatar
 
Join Date: 02-18-04
Location: Minneapolis, Minnesota
Posts: 1,946
iTrader: 0 / 0%
Latest Blog:
None

imaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to allimaginemn is a name known to all
Send a message via MSN to imaginemn Send a message via Yahoo to imaginemn Send a message via Skype™ to imaginemn
Quote:
Originally Posted by Pimpen 2010
Thanks.

Those boxes you have one yours wont show up on mine right?
LOL. No, the logo won't show up either. I just put it there to see the code. I removed the debug code from it and Ur welcome. Glad I could help.

imaginemn
__________________
Need a project done? - Set Your Own Price!
Imagine Creative Services
- Design : Marketing : Multimedia : More
imaginemn is offline  
Add Post to del.icio.us
Reply With Quote
Old 02-03-2005, 05:27 PM   #12 (permalink)
Contributing Member
 
Pimpen 2010's Avatar
 
Join Date: 10-13-03
Location: Pffffft
Posts: 8,857
iTrader: 0 / 0%
Latest Blog:
None

Pimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nicePimpen 2010 is just really nice
Send a message via AIM to Pimpen 2010 Send a message via Yahoo to Pimpen 2010
Just makin sure cause it's different code Thanks again man
Pimpen 2010 is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting an RSS feed to show in a php page lloyd Coding Forum 2 05-24-2007 01:54 AM
How do I block Feed Scrapers from stealing my blog feed? kagemusha Blogging Forum 0 03-27-2007 11:57 AM
Friday Night Lights (tv show), and House (tv show) sim Forum Lobby 0 10-31-2006 05:13 PM
FEED HELP PLEASE!!! Crushed Optimism Coding Forum 2 09-03-2006 07:03 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 02:56 AM.
© Copyright 2008 V7 Inc