Addiing to page automaticly

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
WiZARD
Moderator
Moderator
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Mon Jul 02, 2007 4:38 am

Peuplarchie wrote:Good day,
I was wondering how can I had a link to a page each first or the month ?
Can I also automaticly create that page in a folder that I would create a the same time.

Here's what it would do by step :

- check date, if 1st of month, create new folder named the name of the month in this year folder if it not already done.
- create a html file named the name of the month, if it's not already done.
- Add a link to the newly create page on the menu page in another folder, if it's not already done.
- redirect to page in another folder

Thanks for your help !
to create this file it's not a problem but depended from the OS, but this is not secure for your site...
I reccomed read about apache module mod_rewrite I think what this bettere solution in your situation
about mod_rewrite you can find in Google
or use this (selective taked from the google) links:
http://www.ilovejackdaniels.com/mod_rew ... _sheet.pdf
http://www.sitepoint.com/article/guide-url-rewriting
http://www.workingwith.me.uk/articles/s ... od_rewrite

but If you want really create folder and files you can use
system() or shell_exec() php function

good luck!
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";
Image
Post Reply