<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:RSS Feed script (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:RSS Feed script
#913
gwilson (User)
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
Speak Spanish Like A Gringo
RSS Feed script 2 Years, 8 Months ago Karma: 0  
Updated 28th May 2009 - verion 0.1a

The following script will generate an RSS feed of the last 10 new sites added.

Installation: Upload the script to the same directory as the file 'directory'.

Modification:

$entries = {number of entries you want};

or the SQL query could be modified to give all sites added in the past x number of days.

Check your feed at: http://www.feedvalidator.org/

Version History

0.1 Initial Release
0.1a fixed SQL so it correctly displays newest sites, and limit them to the last 10 (customizable). Also added the category to the site description.
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/05/28 03:02 By gwilson. Reason: Updated to version 0.1a
  The administrator has disabled public write access.
#926
gwilson (User)
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
Speak Spanish Like A Gringo
Re:RSS Feed script 2 Years, 8 Months ago Karma: 0  
Can't attach a file to my edited post... attached is version 0.1a.
File Attachment:
File Name: rss0.zip
File Size: 1459
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1202
Kosiii (User)
Junior Boarder
Posts: 31
graphgraph
User Offline Click here to see the profile of this user
gregykos a-bet.info abetinfo
Re:RSS Feed script 2 Years, 1 Month ago Karma: 0  
This one worked fine ... the only problem is the language issue. Even though the rss is in utf8 the greek language description of the feeds appears in this way :
Code:

προγνωστικα στοιχηματος, Στοίχημα, κουπόνι, προγνωστικά, πρωτάθλημα, συγκριτικά,
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/12/15 17:12 By Kosiii.
 
links.a-bet.info ... we share it all!
  The administrator has disabled public write access.
#1204
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:RSS Feed script 2 Years, 1 Month ago Karma: 9  
ouch

You could try this, but I can guarantee the results..

Using PHPMyAdmin you can copy your links table (the one that ends with _links)
so you have a back up, just in case.

You can then edit the character set used on the description column, try changing it to UTF8 and check your RSS feed, as well as the rest of your DNPL installation to make sure every thing is ok.

If not, you can drop your links table and rename the backup you made to the original name.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1642
webking (User)
Fresh Boarder
Posts: 17
graphgraph
User Offline Click here to see the profile of this user
Re:RSS Feed script 8 Months ago Karma: 0  
It's not working for me. When I try to validate the rss.php page, it produced the following error.
QUOTE:

Sorry

This feed does not validate.

line 1, column 0: XML parsing error: <unknown>:1:13: not well-formed (invalid token) [help]

<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\"><channel><a ...
In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendation.

Feeds should not be served with the "text/html" media type [help]


Source: http://www.mywebsite.com/rss.php

<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\"><channel><atom:link href=\"".$base_url.$base_path."/rss.php\" rel=\"self\" type=\"application/rss+xml\" /> <title>".$site_title."</title> <link>".$base_url.$base_path.$index."</link> <description>".$site_desc."</description> <language>en-us</language> <copyright>(c) Copyright by ".$site_title."</copyright> <managingEditor>".$owner_email." (".$site_title." Admin)</managingEditor> <generator>Dew-NewPHPLinks RSS2 Syndication Mod by Graeme Wilson</generator> <ttl>1</ttl> ";$conn = mysql_connect("$dbhost", "$dbuser", "$dbpasswd"); if (!$conn) { echo "Unable to connect to DB: " . mysql_error(); exit; } if (!mysql_select_db("$dbname")) { echo "Unable to select database $dbname: " . mysql_error(); exit; } $gs_query = mysql_query($sql) or die("Invalid query: " . mysql_error()); while($row = mysql_fetch_assoc($gs_query)){ $post_link = $base_url.$base_path."/out.php?ID=".$row['site_id']; $site_desc = "In [<a href=\"".$base_url.$base_path."/".$index."/".$row['cat_id'].".html\">".$row['category_name']."</a>] - ".$row['site_description']; $xml_result .= " <item> <title>".make_xml_compatible($row['site_name'])."</title> <link>".$post_link."</link> <description>".make_xml_compatible($site_desc)."</description> <pubDate>".date('r', strtotime($row['added']))."</pubDate> <guid isPermaLink=\"true\">".$post_link."</guid> </item>"; }mysql_free_result($gs_query);$xml_result .= '</channel></rss>';echo $xml_result;?>
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1643
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:RSS Feed script 8 Months ago Karma: 9  
Your server doesn't seem to be actually running the script
because things like $base_url.$base_path should of been translated to the values taken from the settings table.

Are you sure you have the file named with a .php extension ?

Possibly the opening PHP tag was accidentally removed?

I have not actually looked over this contribution in quite some time. When I have a chance later today I'll give it a test run, and if need be post a fixed version.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008