Jump to content

allowing users to host their own pages


asmith

Recommended Posts

Hi,

 

I want to give my users the ability to host their own pages. But only simple html. no php.

 

for any page they use :

str_replace(array('<?','<?php','?>'),'',$content);

 

to remove the php tags. I also need to let them upload any file other than html, like images, css files, or other file types for download so that they can put their link on their pages.

 

Have someone done such thing before?

I'm worried about making a security hole.

 

Any advice?

Link to comment
Share on other sites

Thanks for the reply. I don't have any problems uploading files.

 

I want to allow users to host their HTML pages. like Yahoo! geocities or similar sites.

I want to give them some space to upload their files.

 

They will have to submit their html page content into a textarea. I will search the content for php tags to remove it (no php allowed) by this as said :

 

str_replace(array('<?','<?php','?>'),'',$content);

 

but also they should be allowed to upload many files.

 

The question is, is it safe enough? I mean they way I'm about to do it, is safe? Should I consider some more things for security?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.