Web Design and Development Forums

RSS feeds in PHP

This is a discussion on "RSS feeds in PHP" within the XML, RSS & Atom section. This forum, and the thread "RSS feeds in PHP are both part of the Program Your Website category.

Old Sep 27th, 2006, 18:50   #1 (permalink)
New Member
 
Join Date: Sep 2006
Location: OHIO
Age: 21
Posts: 3
RSS feeds in PHP

Hey all,

Excuse my name, I swear I tried 10 names all taken so my temper took over. I'm surprised I lasted through 10.

To my question:

I have RSS feeds in javascript on this page .. I would like to have them in PHP, but being that I know nearly nothing of PHP yet and it's not in my timeframe to learn all that much right now, how do I put these feeds in PHP.

The main reasons I want to do this are:
1. not everyone has javascript allowed on their browser
2. the content is not actually on my page when you use javascript, and I'm under the impression that the use of PHP will allow the content to be readable, by screen readers (google bots, etc..), as if it were regular text.

What I know (or think I do)
- I am hosted on a linux server.
- I have to have a .php extension on my page because php stuck in .html doesn't display right?
- I cannot use the .htaccess in order to get my extension to be .html even though the page is in php, because I'm hosted on a linux server?

I have really no knowledge of php, would it be fesible for me to be able to manage my page if I did this?

What would be the best way to go about this ??

Here is the javascript code:
<script type="text/javascript" src="http://app.feeddigest.com/digest3/1JJQV8IDVT.js"><noscript><a href="http://app.feeddigest.com/digest3/1JJQV8IDVT.html">Click for &quot;Wireless Technology&quot;.</a> By <a href="http://www.feeddigest.com/">Feed Digest</a></noscript></script>

Here is the php code:
<?php
include ("http://app.feeddigest.com/digest3/1JJQV8IDVT.html");
?>


I think that covers it.. I am really on a time crunch here, so I really appreciate any future replies.

Thanks again,

aljasdolfdjododl (lol)

Last edited by aljasdolfdjododl; Sep 27th, 2006 at 19:20. Reason: added code to post
aljasdolfdjododl is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Sep 27th, 2006, 20:00   #2 (permalink)
Most Reputable Member
 
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,319
Send a message via Skype™ to ukgeoff
Re: RSS feeds in PHP

Firstly:
Quote:
What I know (or think I do)
- I am hosted on a linux server.
- I have to have a .php extension on my page because php stuck in .html doesn't display right?
- I cannot use the .htaccess in order to get my extension to be .html even though the page is in php, because I'm hosted on a linux server?
Your 2nd assumption is wrong. I have lots of html pages with embedded php code.
Your 3rd assumption is also wrong. Your Linux server is the underlying operating system. Your web pages will be being served from an Apache web server.

Your php include code looks good. Suggest you wrap the news feed in <div> tags so that you can position and style it with css where you like.
__________________
Regards
Geoff
ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Sep 27th, 2006, 20:21   #3 (permalink)
New Member
 
Join Date: Sep 2006
Location: OHIO
Age: 21
Posts: 3
Re: RSS feeds in PHP

So what? All I have to do is put the php code embedded in the html? I find that hard to believe but I'll try. Also the the feed is already styled with the feed manager I use so no need for <div>'s ...

Ill check back with results in a second..
aljasdolfdjododl is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Sep 27th, 2006, 20:28   #4 (permalink)
New Member
 
Join Date: Sep 2006
Location: OHIO
Age: 21
Posts: 3
Re: RSS feeds in PHP

OK, so I put the php code into my html and it did nothing. My site is PHP enabled, I know there's something else I have to do. What is it??
aljasdolfdjododl is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Sep 27th, 2006, 21:34   #5 (permalink)
Most Reputable Member
 
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,319
Send a message via Skype™ to ukgeoff
Re: RSS feeds in PHP

If you mean you embedded the php in a file with a .html extension, then you will have to place a line in your .htaccess file that tells the server to pass .html files throough the php parser.

Code: Select all
AddType application/x-httpd-php .html .php4 .shtml .txt
__________________
Regards
Geoff
ukgeoff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old Sep 28th, 2006, 03:44   #6 (permalink)
Reputable Member
 
Join Date: Jul 2005
Location: Melksham, Wilts, UK
Posts: 294
Re: RSS feeds in PHP

Quote:
Originally Posted by aljasdolfdjododl View Post
- I cannot use the .htaccess in order to get my extension to be .html even though the page is in php ....
Quote:
Originally Posted by ukgeoff
.... then you will have to place a line in your .htaccess file....
Geoff: I think aljasdolfdjododl's ISP isn't allowing overrides like that in the main httpd configuration file, so he won't be allowed to do this.

Aljasdolfdjododl: I think you'll need to establish just what does and does not work in terms of PHP file extensions on your server. The tech support desk at the ISP and / or their FAQs may help, but more likely they won't know. Put a file called testing.php in your document root (i.e. home directory for web pages) which contains:
<?php phpinfo() ; ?>
(yes, just that 1 line) and point your browser at it:
http://yourdomainnamehere/testing.php
If you get nothing, or (when you view sources in your browser) you just see the phpinfo command, your PHP has not worked. If you see a complete configuration report from PHP, then - hey prosto - you know what extension to use!

If the first test does not suceed, then try extensions .php, .php4, .php5 and .phtml; I've seen all of these in modern use. You'll need to rename or re-upload the file AND change the URL that you browse to.
__________________
Graham Ellis ...
Open Source trainer with Well House Consultants
grahame is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
feeds, how to, htaccess, rss

Thread Tools
Rate This Thread
Rate This Thread:

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

BB 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
Anybody to help me with RSS Feeds? maneetpuri Beginner Resources 4 Mar 15th, 2008 12:57
[SOLVED] PHP RSS Feeds? alexgeek XML, RSS & Atom 2 Oct 30th, 2007 00:50
Google Feeds Bot spinal007 Search Engines 3 May 20th, 2007 10:08
Displaying Rss feeds on my website Gurpreet82 XML, RSS & Atom 0 Jan 15th, 2007 22:12
Help with publishing my RSS Feeds benbigun XML, RSS & Atom 0 Dec 22nd, 2005 02:18



Latest Updates

All Points SEO Security Advisory - CHECK YOUR SITE NOW!

Creative Coding :: February 2008

Webforumz is sponsored by: WESH UK Web Hosting
All times are GMT. The time now is 15:11.

Sleep Study Scoring :: Free Bet :: Website Templates :: Online Betting :: Bookmakers :: Funny Quotes :: Internet Recruitment Software :: Microsoft CRM Experts :: Online Casino :: Decorated Christmas Trees :: Midwife Forums :: Football Betting :: Ecommerce Software :: Web Hosting :: Football Stats :: Dry Cleaning Collection :: xtreme wales - extreme clothing :: Apuestas :: Sharepoint Consultants :: Website Optimisation :: Office Clearance London :: Sharepoint Experts :: Sports Betting :: Casino :: Website Templates :: Web Design Development India :: Online Gambling

Powered by: vBulletin Version 3.7, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
© 2003-2008 Webforumz.com : All Rights Reserved
Search Engine Friendly URLs by vBSEO 3.2.0 RC6


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59