PDA

View Full Version : PHP Scripts


insidedesign
03-22-2006, 09:28 PM
I am interested in adding a RSS script, in PHP, into my directory pages. To do this, the file extension for the pages must be .php

Is it possible to dictate to the program which file extension to assign the files when created?

pelves
03-23-2006, 07:36 AM
Hello!
Firstly, why do say the file extension must be .php ? You can parse .html files through your php module no problem. For example, the PHP Link Directory already has an option somewhere which results in adding the following lines to your .htaccess file:
Content visible to registered users only.
This means that when a .html or .htm file is requested, it is treated as a php file (which, in the case of phpld it actually is).

What exactly do you mean by 'adding an RSS script' to your directory pages?

anon
03-23-2006, 07:46 AM
Content visible to registered users only.

well hell, that looks like my .htaccess too haha

Content visible to registered users only.

you see though, the thing is simplicity here. you need not confuse people with things like .htaccess file. it'll only make things more complicated for you in the long run, because you'll be receiving the questions, and having to answer them.

anywho, i think he wants to call a php script for a feed or something.

like what i wrote for Optimit earlier today: {malware warning found at this site - link removed}

pelves
03-23-2006, 07:51 AM
Hello anon!
I was a little confused by this line in his post:
Content visible to registered users only.
I'm still not sure what he means, but it looks like I can just let you write a script for him :lol:
Just trying to help...

anon
03-23-2006, 07:55 AM
Content visible to registered users only.
I'm still not sure what he means, but it looks like I can just let you write a script for him :lol:
Just trying to help...[/quote]

oh heck no! hahahaha

what you've told him should work fine with no problems at all. just looking out for you just in case something gets 'messed' up, so you are not to blame.

(yes, i know it wont mess anything up. but people tend to choose the latter, and never want to take the blame)

insidedesign
03-25-2006, 07:37 PM
My .htaccess, just has this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [QSA,L]


This does not seem to be working. Should I just swap it out for your code?

Jim_Westergren
03-25-2006, 11:54 PM
I have added a RSS feed to my dir in the past. It was very tricky but I wrote down how I did it and you might find it useful:
http://www.jimwestergren.com/tutorial-rss-feed-inside-smarty-template-files/

insidedesign
03-26-2006, 02:31 AM
Looks indepth. Thanks for the wonderful resource! I will share it with others :)