•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,596 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,706 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2998 | Replies: 15
![]() |
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.
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.
•
•
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation:
Rep Power: 4
Solved Threads: 6
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!
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!
Ecommerce-Web-Store.com Building Your e-Business.
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!
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!
•
•
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation:
Rep Power: 4
Solved Threads: 6
•
•
•
•
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?
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.
Ecommerce-Web-Store.com Building Your e-Business.
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.
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.
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!
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!
sorry - i meant the website address will be my IP address
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!
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!
•
•
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation:
Rep Power: 4
Solved Threads: 6
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!
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!
•
•
Join Date: Jan 2005
Location: Sheffield, UK
Posts: 294
Reputation:
Rep Power: 4
Solved Threads: 6
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.
$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.
Ecommerce-Web-Store.com Building Your e-Business.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
adult advertising blog browser browsing community creative data design development devices domains firefox free google html india internet java legal linux marketing merger microsoft mobile mozilla msn multimedia news php print privacy report research rss search security sex social networking software sun tutorials video w3c web web development wikipedia xml yahoo youtube
- Hello Everyone (Community Introductions)
- Ipb 1.3 to free web host (Geeks' Lounge)
- Free web host with CF server (Web Hosting Deals)
Other Threads in the PHP Forum
- Previous Thread: How To Upload in PHP
- Next Thread: PHP 5.0.5 Released - Vulnerability Fixes


Linear Mode