Subdomain maker and file writer
10 posts
Page 1 of 1
Does anybody know how to let a user input a word in a text bx which the by flcking submit would create a subdomain with that name in the .htAccess and then write a few files to that folder.
Thanks Alex
Thanks Alex
Free Facebook Page Likes - http://fbliker.tk/?ref=gillis
Its definitely possible but if you want a script to do it then it depends on which web/dns servers you are using.
Yeh, pretty much anything is possible, you just have to know how to do it.
make sure your host allows you to do it first. Because if you are violating the ToS then you could well be suspended/banned. PS: Who are you with?
thanks for the replies!
I am with 000webhost.
and i would need the script to write files to a new folder then but that folder in the .htacsess to make it a subdomain.
PS does anybody know how to make a quota limiter?
I am with 000webhost.
and i would need the script to write files to a new folder then but that folder in the .htacsess to make it a subdomain.
PS does anybody know how to make a quota limiter?
Free Facebook Page Likes - http://fbliker.tk/?ref=gillis
Writing the files should be the easy part.
Edit: I think you might need to put in a few security checks before you decide to use this on your site.
Code: Select all
If you have a wildcard domain with 000webhost then you can tweak this script to make a folder from getenv("HTTP_HOST").<?php
$folder = "test";
if (!file_exists($folder))
mkdir($folder);
$file = $folder . "\.htaccess";
$text = "allow from all";
$fw = fopen($file, "w") or die("Could not open or create $file.");
fwrite($fw, $text) or die("Could not write to $file.");
fclose($fw);
?>
Edit: I think you might need to put in a few security checks before you decide to use this on your site.
Ya probebly a bad idea 000 will probebly shut down my site if I did this.
Free Facebook Page Likes - http://fbliker.tk/?ref=gillis
lol 000webhost won't allow this... Just use http://www.x10hosting.com and buy a paid domain... I will just check with the owner that this is allowed though first.
10 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023