473,605 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How come my RSS feed doesn't always load?

34 New Member
I am having trouble with my RSS script. It loads correctly in Safari, it is displayed as text in Chrome, it doesn't load in Internet Explorer, and it load every 3 or 4 refreshes in Firefox... it is very strange. Here is my code, it loads the data from a sql database. You can see the live page here: http://www.eventvt.com/rss.php

Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. mysql_connect(DB_HOST, DB_USER, DB_PASS) or die(mysql_error());
  4. mysql_select_db(DB_NAME) or die(mysql_error());
  5.  
  6. $sql = "SELECT id, title, text FROM TABLE order by id desc limit 15";
  7. $result = mysql_query($sql) or die(mysql_error());
  8. //$row = mysql_fetch_array($result);
  9.  
  10.  
  11. while ($line = mysql_fetch_assoc($result))
  12.         {
  13.             $return[] = $line;
  14.         }
  15.  
  16. $now = date("D, d M Y H:i:s T");
  17.  
  18. $output = "<?xml version=\"1.0\"?>
  19.             <rss version=\"2.0\">
  20.                 <channel>
  21.                     <title>eventVT RSS</title>
  22.                     <link>http://www.eventvt.com/rss.php</link>
  23.                     <description>New events in the Vermont area</description>
  24.                     <language>en-us</language>
  25.                     <pubDate>$now</pubDate>
  26.                     <lastBuildDate>$now</lastBuildDate>
  27.                     <docs>http://www.eventvt.com</docs>
  28.                     <managingEditor>eventvt@gmail.com</managingEditor>
  29.                     <webMaster>eventvt@gmail.com</webMaster>
  30.             ";
  31.  
  32. foreach ($return as $line)
  33. {
  34.     $output .= "<item><title>".htmlentities($line['title'])."</title>
  35.                     <link>http://www.eventvt.com/eventdisplay.php?id=".htmlentities($line['id'])."</link>
  36.  
  37. <description>".htmlentities(stripslashes($line['text']))."</description>
  38.                 </item>";
  39. }
  40. $output .= "</channel></rss>";
  41. header("Content-Type: application/rss+xml");
  42. echo $output;
  43. ?>
  44.  
May 3 '11 #1
0 1076

Sign in to post your reply or Sign up for a free account.

Similar topics

6
3175
by: alan | last post by:
Dear all, I have a servlet problem. When I modified my java servlet program and then uploaded it to my web hosting server, then I start my web browser(I.E) to see the result. But it loaded the previous java servlet class program. After several days, these new classes file can be refreshed on browser. I want to know how I can make sure I always see the most update
4
3500
by: Bob Bedford | last post by:
We have no access to a mysql NG on my provider's server, so we ask here: We have a long query (long in text) with a UNION between 2 select. We have been informed that some times the query doesn't return any result. We have tried on our server and we always get a result. BUT, trying on the hosting server, many times the query doesn't return any result and doesn't get any error. Any idea ? does Union have any problem ? how to check if...
14
2059
by: g | last post by:
http://mysite.verizon.net/gdguarino/montauk.htm You can also click on the other pages of the site if the problem doesn't show itself on this page. I'm using two stylesheets for each page, one with the position and size information for each element and another for the color and background info. The position stylesheet is common to all pages. Sometimes only the "color" stylesheet loads, leaving the page a mess.
3
3739
by: Phil Galey | last post by:
I have a VB.NET application that uses SendKeys to close the open document in QuarkXPress 5.0 I'm using the following commands: AppActivate(QXP_Process_ID) SendKeys.SendWait("^{F4}") in an effort to close the document currently open in QuarkXPress. However, it only works if I set a breakpoint on or shortly before the AppActivate
7
5068
by: gmax2006 | last post by:
Hi, I use RedHat linux. How can I find where exactly the current python script is running? I use this code: #test.py import os,sys
2
6598
by: Jason | last post by:
Hello everyone, I have a chatroom. If someone leaves, I need to tell the server that person has left. Currently i catch window.onbeforeunload to check if the person tries to leave. I noticed that when I don't have a dialog popup asking if the person really wants to leave, my Ajax-request code doesn't always get sent to the server. Basically, the popup ensures my beforeunload code gets executed. Why is this? Also, when I try to stop the...
1
1012
by: brett | last post by:
I have a user control with a namespace similar to: mysite.SomeApp.TheControl In an aspx page, I'd like to load the above control based on its filename. The page is in the same namespace, mysite.SomeApp and both can see each other through intellisense. Session contains the text "TheControl.ascx". When I try to execute this code in the aspx page
3
4948
by: annoula | last post by:
Hello, I'm sorry if this has come up before but I haven't been able to find a solution in any forum so far. I have a page with 2 forms. One form contains links that the user clicks to navigate to pages.The other form is the main component of the page. It has radiobuttons and textfields for the user to select/enter input. The links have actions that I want to fire if the javascrict that I have in the 'onclick' validates. If it doesn't...
0
1106
by: neverMind | last post by:
Hi there, I have an assignment to invert a ppm image, with a header of 4 lines (P6\nwidth\nheight\ndepth\n),and we have to do a shared memory version and a memory mapped file (MMF) too. This version is basically equal to the SM version, whick worker, but with mmf, but the final image although is inverted it shows a small black line and a grey two, in the end, even the file has the same size ... The more stranger is that yesterdar the output...
0
7938
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8430
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8078
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5892
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5452
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3914
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2441
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1548
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.