What is involved with archiving pages?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
caljuice
Forum Newbie
Posts: 3
Joined: Fri Oct 02, 2009 1:34 am

What is involved with archiving pages?

Post 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.
Last edited by caljuice on Fri Oct 02, 2009 2:42 am, edited 1 time in total.
Griven
Forum Contributor
Posts: 165
Joined: Sat May 09, 2009 8:23 pm

Re: What is involved with archiving pages?

Post 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.
caljuice
Forum Newbie
Posts: 3
Joined: Fri Oct 02, 2009 1:34 am

Re: What is involved with archiving pages?

Post 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.
mybikeisgreen
Forum Newbie
Posts: 22
Joined: Thu Oct 01, 2009 6:22 pm

Re: What is involved with archiving pages?

Post 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.
Post Reply