Page 1 of 1

What is involved with archiving pages?

Posted: Fri Oct 02, 2009 1:45 am
by caljuice
Hello,

I want to get a text from a user and generate a new unique page, containing the text, each time. Then archive the many sites and allowing users to delete their text pages. I'm not sure how to look for the information I need

Is there any specific type of php functions, or is this mostly mysql based? Any direction would be nice. Thanks.

Re: What is involved with archiving pages?

Posted: Fri Oct 02, 2009 1:47 am
by Griven
From what you've said so far, this sounds like something that would rely on a database.

In order to really point you in the right direction, more detailed information on what you're trying to do would be helpful.

Re: What is involved with archiving pages?

Posted: Fri Oct 02, 2009 2:52 am
by caljuice
Okay sorry.

So basically one page will get a user's text then store that text into a separate newly generated page and display it.
A user will post and url.com/pageid=12151 gets created
Another user will post and url.com/pageid=12152 is created
url.com/pageid=12153... and so on for each time a text is stored.

I guess similar to a forum archiving.

Then anyone can go into the archive page and see any of those pages. But the users who posted will have the options to delete their posts. I probably will integrated this with v-bulletin if possible.

I guess my main question is, how does php generate new pages and store the text? Is it done through sql or creates a new php file to read from? I don't know much about mysql.

Re: What is involved with archiving pages?

Posted: Fri Oct 02, 2009 4:36 am
by mybikeisgreen
You can use file_put_contents() to write the text to a file. Better to give it a .html file extension though. If you give it .php then they can write malicious code into it.

Typically a database is used for keeping track of users. You would need two tables, one table of users and one of files that they have created. If you have phpmyadmin on your server that is a very powerful database tool.