944,175 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 5348
  • PHP RSS
You are currently viewing page 1 of this multi-page discussion thread
Sep 3rd, 2005
0

How To Create A Free Web Host

Expand Post »
Hi,

I was wondering if there's a tutorial on making a website that offers free hosting. I know how to upload files with PHP, so I posted this topic here.

Thanx.
Similar Threads
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Sep 4th, 2005
0

Re: How To Create A Free Web Host

2 options: 1. Build your own web server, 2. Sign up for reseller hosting package

Unless you build the free hosting service for marketing purposes (generate many users who looking for free stuffs), offering free hosting service need serious money input!
Reputation Points: 10
Solved Threads: 7
Posting Whiz in Training
zippee is offline Offline
294 posts
since Jan 2005
Sep 4th, 2005
0

Re: How To Create A Free Web Host

Hi Zippee,

Thanks. The site will only host a few of my friend's site - no one else. I wanted to make it so when they sign up a directory is created that's password protected with their password. Is there a way to do this? If there is, could you tell me or show me a tutorial?

Thanks a lot!
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Sep 4th, 2005
0

Re: How To Create A Free Web Host

Quote originally posted by Ghost ...
The site will only host a few of my friend's site - no one else. I wanted to make it so when they sign up a directory is created that's password protected with their password. Is there a way to do this? If there is, could you tell me or show me a tutorial?
It will be very similar to my store2go.net site.
Create a php file that allow your friends to enter directory name, user name and password. Use mkdir function to create folder and (use fopen and fwrite) create .htpasswd file in the folder with their username and password. I never use .htpasswd so cannot comment.
Reputation Points: 10
Solved Threads: 7
Posting Whiz in Training
zippee is offline Offline
294 posts
since Jan 2005
Sep 5th, 2005
0

Re: How To Create A Free Web Host

Hi,

Thanks! Can you explain more about the file writing and the make directory function? Thanks!

Also, if anybody knows about .htpsswrd, I would appreciate your help.

Thanks again.
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Sep 5th, 2005
0

Re: How To Create A Free Web Host

Hi Zippee,

Also, instead of uploading through the browser, can they upload through an FTP? I'll be hosting through Apache Webserver on my own computer. The web address will be my email address.

Thanks!
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Sep 5th, 2005
0

Re: How To Create A Free Web Host

sorry - i meant the website address will be my IP address
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Sep 5th, 2005
0

Re: How To Create A Free Web Host

Hi Everyone,

I got the file creation to work! Is there a way to make a page where the user enters a username and password and it takes you to an upload page where you can upload files? I already know how to make the upload page. The only problem is that I can't use databases - they don't work on my computer!

Thanks for your help in advanced!
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Sep 5th, 2005
0

Re: How To Create A Free Web Host

1. You can create a simple login page (with or without database connection). If without db, then use txt file to save data (but is limited to small number of users only). After successfully login, redirect user to upload page.
2. Unless you want to upload file to database, you can uploading file directly into folder without a database running on your machine.
3. You propably need to install mysql on your server to run database. Also install phpMyAdmin for better user interface.

P/S: not good enough to comment on FTP side. sorry!
Reputation Points: 10
Solved Threads: 7
Posting Whiz in Training
zippee is offline Offline
294 posts
since Jan 2005
Sep 5th, 2005
0

Re: How To Create A Free Web Host

Create folder on the fly:[php]// get folder name - user define
$folder_name = $_GET['fname'];
// where the folder need to be created
$path = 'user/';
// check if folder already exists, if not create new folder
if (!is_dir($folder_name)) {
mkdir($path.$folder_name, 0777) or die ('Could not create folder');
}
[/php]Do check php.net for permission mode. 0777 is open to public to read, write and execute.
Reputation Points: 10
Solved Threads: 7
Posting Whiz in Training
zippee is offline Offline
294 posts
since Jan 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: registaration of users scripts
Next Thread in PHP Forum Timeline: Date Conversion





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC