| 
		
			
			
				
			
			
				 
			
			
				
			
		 | 
		
			
			
				 
			
				
			
		 | 
	||||
| 
				Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.  You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us.  | 
		
		 
		![]()  | 
	
		
			
  | 	
	
	
		
		|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
| 
		 | 
	Thread Tools | 
| 
			
			 | 
		#1 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
			
			 
				
				Programmers, how hard would this be?
			 
			I have a Lyrics script running on a site of mine, and it allows me to have an rss feed...the issue is that the rss only publishes the title of the lyric with a link to that lyric, plus it only lists the last 20 lyric posts 
		
	
		
		
		
		
		
		
			
		
		
	
	I want the feed to publish all the lyrics to that song, and also when the site hasn't been updated that day to publish a random lyric from the database...it has over 500,000 songs in it, so even if we set it to do any random song, the probability of it being a duplicate that the rss has seen recently is minimum the script is Lyricing, you can see it in action here: http://www.lyricing.com/ the feed is http://www.lyricing.com/rss.php and the code to rss.php is Code: 
	<?
include_once "config.php";
header("Content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo '<rss version="2.0">';
echo '<channel>
<title>lyrics</title>
<description>music lyrics</description>
<link>http://www.domain.com/</link>';
$ex_sql = mysql_query( "select lyric_id, lyric_artist, lyric_title from lyrics where approved='1' order by lyric_id desc limit 20");
$num_rows = mysql_num_rows($ex_sql);
if ( $num_rows >= 1) {
while ($mysql_array = mysql_fetch_array($ex_sql)) {
echo '<item>
<link>http://www.domain.com/'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_artist']).'/'.$mysql_array['lyric_id'].'-'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_title']).'.html'.'</link>
<title>'.htmlspecialchars($mysql_array['lyric_artist']).' - '.htmlspecialchars($mysql_array['lyric_title']).'</title>
<guid>http://www.domain.com/'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_artist']).'/'.$mysql_array['lyric_id'].'-'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_title']).'.html'.'</guid>
</item>';
}
} else {
echo 'No latest lyrics available.';
}
echo '</channel></rss>';
?>
how hard would this be?  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Feb 2005 
				
				
				
					Posts: 2,093
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Interesting... I will hit up a dude and see what he can do. 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	Earn up to $.03 per Visitor -> No Click Monetization! "Because the World Wide Web is all about two things: horrifyingly stupid psychodrama, and naked chicks."Wild College Videos | ICQ: 7746696  
			 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#3 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#4 | 
| 
			
			
			
			 Registered User 
			
		
			
			
			Join Date: Jan 2008 
				Location: Mexico Se Vende! 
				
				
					Posts: 64
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Sorry I can not help you good luck 
		
	
		
		
		
		
			
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#5 | |
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Feb 2005 
				
				
				
					Posts: 2,093
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 You know Steve in NY (aka Hudson) right? 
				__________________ 
		
		
		
		
	
	Earn up to $.03 per Visitor -> No Click Monetization! "Because the World Wide Web is all about two things: horrifyingly stupid psychodrama, and naked chicks."Wild College Videos | ICQ: 7746696  
			 | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#6 | 
| 
			
			
			
			 Registered User 
			
		
			
				
			
			
			Join Date: Jan 2008 
				
				
				
					Posts: 98
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Hey Jace, 
		
	
		
		
		
		
		
	
	It's not hard at all...unfortunately I'm very tired right now and may not be completely understanding you correctly, but it sounds like you would just need to add 'lyric_text' to the SELECT query, and loop that into an element, for example: Code: 
	<lyrics>' . $mysql_array['lyric_text']) . '</lyrics> Like I said I'm tired but if you want to shoot an email to wpkings at gmail then I can take a look at it tomorrow. From the sound of it, it's like a 10 min job that wouldn't really cost anything.  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#7 | 
| 
			
			
			
			 Confirmed User 
			
		
			
				
			
			
			Join Date: Dec 2006 
				Location: Near AMS 
				
				
					Posts: 201
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Yeah, that's right. and you might want to put a cdata block around the lyric text else your rss would break in case of any special chars. 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#8 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 The SQL query isn't pulling by date, it's just pulling the most recent 20 songs, meaning there will never be an empty results set so there's no need to randomize. 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#9 | 
| 
			
			
			
			 Registered User 
			
		
			
				
			
			
			Join Date: Jan 2008 
				
				
				
					Posts: 98
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 And obviously the result limit is set with LIMIT: 
		
	
		
		
		
		
		
	
	Code: 
	$ex_sql = mysql_query( "select lyric_id, lyric_artist, lyric_title from lyrics where approved='1' order by lyric_id desc limit 20"); And yes, like mr.K mentioned... Code: 
	<lyrics><![CDATA[' . $mysql_array['lyric_text']) . ']]></lyrics> The other part with the random lyrics isn't hard but I'd probably give you the wrong code if I tried now, so that can wait until tomorrow  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#10 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Nevermind I think I realize what you mean.. can you paste the column name in the SQL database for date added, and also the format (likely YYYY-MM-DD but want to be sure) 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#11 | |
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 I want to use it to update blogs, and if the songs never rotate then the blog will pull the same songs every day  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#12 | |
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 can I hit you up tomorrow to do this?  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#13 | |
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 now I just need to figure out how to get the lyrics to show up too  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#14 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Paste column name for full lyrics text, date, and sample date.. I'll get this cooked up for you before heading to bed  
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#15 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 lyric_text is the sql column that holds all the lyrics data 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#16 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 there is also 
		
	
		
		
		
		
		
	
	temp_date submit_date  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#17 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 what format is submit_date in? 2008-01-31 ? 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#18 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 this is weird though, all the dates are showing up as 
		
	
		
		
		
		
		
	
	0000-00-00 00:00:00  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#19 | 
| 
			
			
			
			 Registered User 
			
		
			
				
			
			
			Join Date: Jan 2008 
				
				
				
					Posts: 98
				 
				
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#20 | 
| 
			
			
			
			 Too lazy to set a custom title 
			
		
			
				
			
			
			Industry Role:  
				Join Date: Mar 2003 
				Location: Sweden 
				
				
					Posts: 30,070
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Lot's of help here it seems, I suck at programming anyway lol 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	gfynicky @ gmail.com  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#21 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 there is a lyric_id field though, you could randomize with that 
		
	
		
		
		
		
		
	
	but I only want the random thing when I don't add lyrics, if I add lyrics for the day there would be no random lyric  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#22 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Not sure why your dates are screwy, assuming they worked this code ought to do the trick: 
		
	
		
		
		
		
			Code: 
	<?
include_once "config.php";
header("Content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo '<rss version="2.0">';
echo '<channel>
<title>lyrics</title>
<description>music lyrics</description>
<link>http://www.domain.com/</link>';
$sql_query = "select lyric_id, lyric_artist, lyric_title, lyric_text from lyrics where approved='1' order by lyric_id desc limit 20";
// Analyze date of latest entry
$date_chk= mysql_query("select submit_date from lyrics where approved='1' order by lyric_id desc limit 1");
$latest= mysql_fetch_array($date_chk);
$latest_date= split(" ",$latest['submit_date']);
if ($latest_date[0]!=date("Y-m-d")) $sql_query = "select lyric_id, lyric_artist, lyric_title, lyric_text from lyrics where approved='1' order by rand() limit 20";
$ex_sql = mysql_query( $sql_query );
$num_rows = mysql_num_rows($ex_sql);
if ( $num_rows >= 1) {
while ($mysql_array = mysql_fetch_array($ex_sql)) {
echo '<item>
<link>http://www.domain.com/'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_artist']).'/'.$mysql_array['lyric_id'].'-'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_title']).'.html'.'</link>
<title>'.htmlspecialchars($mysql_array['lyric_artist']).' - '.htmlspecialchars($mysql_array['lyric_title']).'</title>
<lyrics><![CDATA['.htmlspecialchars($mysql_array['lryic_text']).']]></lyrics>
<guid>http://www.domain.com/'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_artist']).'/'.$mysql_array['lyric_id'].'-'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_title']).'.html'.'</guid>
</item>';
}
} else {
echo 'No latest lyrics available.';
}
echo '</channel></rss>';
?>
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#23 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#24 | |
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 http://lyrics.gamesandlyrics.com/rss.php  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#25 | |
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 Run this SQL query: UPDATE lyrics set submit_date = '2008-01-30' where 0=0; To set all dates to yesterday 
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#26 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 May want to set to today '2008-01-31' so it stops randomizing 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#27 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 now there is nothing there, haha 
		
	
		
		
		
		
		
	
	http://lyrics.gamesandlyrics.com/rss.php i guess because it technically hasn't been entered yet I know why all the dates are that way though, the sql dump I got was all set to have no submission dates, so when I start enterring them manually they will start having normal datwes  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#28 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 i set it back to 2008-01-30 so I can see what I am working with 
		
	
		
		
		
		
		
	
	thanks!!!! now...to get the full lyrics text in there  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#29 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 add this after the first <link></link> set: 
		
	
		
		
		
		
			<lyrics>full lyrics</lyrics> 
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#30 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 nope i lied... one sec 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#31 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Change: 
		
	
		
		
		
		
			Code: 
	<lyrics><![CDATA['.htmlspecialchars($mysql_array['lryic_text']).']]></lyrics> Code: 
	<description><![CDATA['.htmlspecialchars($mysql_array['lryic_text']).']]></description> 
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#32 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 and change my typo of lryic_text to lyric_text  
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#33 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 oh shit, there it is! 
		
	
		
		
		
		
		
	
	http://lyrics.gamesandlyrics.com/rss.php now, how do I get it to keep the html formatting?  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#34 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Can you paste the PHP back?  There's an error in there somewhere that needs correcting, view source you'll see the PHP warning. 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#35 | |
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
 Code: 
	<?
include_once "config.php";
header("Content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo '<rss version="2.0">';
echo '<channel>
<title>lyrics</title>
<description>music lyrics</description>
<link>http://lyrics.gamesandlyrics.com/</link>';
$sql_query = "select lyric_id, lyric_artist, lyric_title, lyric_text from lyrics where approved='1' order by lyric_id desc limit 20";
// Analyze date of latest entry
$date_chk= mysql_query("select date from lyrics where approved='1' limit 1");
$latest= mysql_fetch_array($date_chk);
$latest_date= split(" ",$latest['date']);
if ($latest_date[0]!=date("Y-m-d")) $sql_query = "select lyric_id, lyric_artist, lyric_title, lyric_text from lyrics where approved='1' order by rand() limit 20";
$ex_sql = mysql_query( $sql_query );
$num_rows = mysql_num_rows($ex_sql);
if ( $num_rows >= 1) {
while ($mysql_array = mysql_fetch_array($ex_sql)) {
echo '<item>
<link>http://lyrics.gamesandlyrics.com/'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_artist']).'/'.$mysql_array['lyric_id'].'-'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_title']).'.html'.'</link>
<title>'.htmlspecialchars($mysql_array['lyric_artist']).' - '.htmlspecialchars($mysql_array['lyric_title']).'</title>
<description><![CDATA['.htmlspecialchars($mysql_array['lyric_text']).']]></description>
<guid>http://lyrics.gamesandlyrics.com/'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_artist']).'/'.$mysql_array['lyric_id'].'-'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_title']).'.html'.'</guid>
</item>';
}
} else {
echo 'No latest lyrics available.';
}
echo '</channel></rss>';
?>
 | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#36 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 somewhere on this line 
		
	
		
		
		
		
		
	
	$date_chk= mysql_query("select date from lyrics where approved='1' limit 1");  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#37 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Code: 
	<?
include_once "config.php";
header("Content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo '<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">';
echo '<channel>
<title>lyrics</title>
<description>music lyrics</description>
<link>http://lyrics.gamesandlyrics.com/</link>';
$sql_query = "select lyric_id, lyric_artist, lyric_title, lyric_text from lyrics where approved='1' order by lyric_id desc limit 20";
// Analyze date of latest entry
$date_chk= mysql_query("select submit_date from lyrics where approved='1' limit 1");
$latest= @mysql_fetch_array($date_chk);
if ($latest){
	$latest_date= split(" ",$latest['submit_date']);
	if ($latest_date[0]!=date("Y-m-d")) $sql_query = "select lyric_id, lyric_artist, lyric_title, lyric_text from lyrics where approved='1' order by rand() limit 20";
}
$ex_sql = mysql_query( $sql_query );
$num_rows = mysql_num_rows($ex_sql);
if ( $num_rows >= 1) {
while ($mysql_array = mysql_fetch_array($ex_sql)) {
echo '<item>
<link>http://lyrics.gamesandlyrics.com/'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_artist']).'/'.$mysql_array['lyric_id'].'-'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_title']).'.html'.'</link>
<title>'.htmlspecialchars($mysql_array['lyric_artist']).' - '.htmlspecialchars($mysql_array['lyric_title']).'</title>
<description><![CDATA['.htmlspecialchars($mysql_array['lyric_text']).']]></description>
<guid>http://lyrics.gamesandlyrics.com/'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_artist']).'/'.$mysql_array['lyric_id'].'-'.preg_replace('/([^a-zA-Z0-9]+)/', '-', $mysql_array['lyric_title']).'.html'.'</guid>
</item>';
}
} else {
echo 'No latest lyrics available.';
}
echo '</channel></rss>';
?>
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#38 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Yeah it's because 'date' isn't the column name, 'submit_date' is.. thought I changed that but obviously not  
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#39 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 now how do I get the html to show up? 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#40 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 That's what I'm looking at.. comparing yours to MSNBC, the only difference is this line: 
		
	
		
		
		
		
			Code: 
	<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> 
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#41 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 i'm a moron.  change this line: 
		
	
		
		
		
		
			Code: 
	<description><![CDATA['.htmlspecialchars($mysql_array['lyric_text']).']]></description> Code: 
	<description><![CDATA['.$mysql_array['lyric_text'].']]></description> 
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#42 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#43 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 what is your epass? 
		
	
		
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#44 | 
| 
			
			
			
			 G F Y not 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: MN 
				
				
					Posts: 2,910
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 PWMOORE@   Appreciate it, although it's not necessary.. just enjoy a mid-night challenge ;) 
		
	
		
		
		
		
			
				__________________ 
		
		
		
		
	
	![]() TGPFactory Full TGP Design & Installation Services ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com See who I am at AdultWhosWho.com!  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#45 | 
| 
			
			
			
			 FBOP Class Of 2013 
			
		
			
			
			Industry Role:  
				Join Date: Jan 2004 
				Location: bumfuck, ky 
				
				
					Posts: 35,562
				 
				
				
				
				 | 
	
	|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#46 | |
| 
			
			
			
			 Confirmed User 
			
		
			
				
			
			
			Join Date: Feb 2005 
				
				
				
					Posts: 1,588
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 Quote: 
	
  | 
|
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#47 | 
| 
			
			
			
			 Confirmed User 
			
		
			
			
			Join Date: Jul 2004 
				Location: The Beach 
				
				
					Posts: 4,626
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 LOL I just read this old thread Dynamix is the only one who seemed to understand that you can't just put a <randomtext> tag in an rss feed  
		
	
		
		
		
		
			I thought every programmer and his mother understood rss from xml by now 
				__________________ 
		
		
		
		
	
	ICQ# 143561781  | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 | 
| 
			
			 | 
		#48 | 
| 
			
			
			
			 Confirmed User 
			
		
			
				
			
			
			Join Date: Jul 2007 
				
				
				
					Posts: 7,687
				 
				
				
				
				 | 
	
	
	
	
		
		
		
		 seems hard dude! Going to ask a friend for you! 
		
	
		
		
		
		
			
		
		
		
		
	
	 | 
| 
		 | 
	
	
	
		
                 
		
		
		
		
		
		
		
			
			
		
	 |