Need Help With a Script
Pleas Admin Small Thing But Very Very Important
ALL I NEED IS YOU ADD CODE IN
THAT'S MAKE ME ABLE TO ADD THE Document Root OF THE NEW SUB DOMAIN CREATED with script
WHEN I TURN SCRIPT ON AND MAKE SUB DOMAINS ALL SUB DOMAINS BECOME LIKE THAT'S
EXAMBLE
SUBDOMAIN.DOMAIN.COM
Document Root
public_html/SUBDOMAIN
I NEED ANY WAY IN SCRIPT MAKE ME WHO ADD THE Document Root I WANT FOR ALL SUB DOMAIN
BECAUSE I WANT ALL THEM HAVE 1 Document Root
EXAMBLE
SUBDOMAIN1.DOMAIN.COM
SUBDOMAIN2.DOMAIN.COM
SUBDOMAIN3.DOMAIN.COM
SUBDOMAIN4.DOMAIN.COM
Document Root FOR THEM ALL
HOME/EXAMBLE
SO PLEAS PLEAS PLEAS HELP ME Cry Cry Cry Cry Cry Cry Cry Cry Cry Cry Cry Cry Cry Cry
SCRIPT
SCRIPT
[PHP])) {
// get parameters passed via URL or form, emulate string from file
$doms = array( getVar('domain', DOMAIN) . ";" . $_REQUEST["subdomain">);
if (getVar('domain', DOMAIN) == '') die("You must specify domain name");
}
else {
// open file with domains list
$doms = @file(INPUT_FILE);
if (!$doms) {
// file does not exist, show input form
echo "
Cannot find input file with subdomains information. It is ok if you are not creating subdomains from file.
Tip: leave field empty to use default value you have specified in the script's code.
Subdomain:
Domain:
cPanel User:
cPanel Password:
cPanel Skin:
"; die(); } } // create subdomain function subd($host,$port,$ownername,$passw,$request) { $sock = fsockopen('localhost',2082); if(!$sock) { print('Socket error'); exit(); } $authstr = "$ownername:$passw"; $pass = base64_encode($authstr); $in = "GET $request\r\n"; $in .= "HTTP/1.0\r\n"; $in .= "Host:$host\r\n"; $in .= "Authorization: Basic $pass\r\n"; $in .= "\r\n"; fputs($sock, $in); while (!feof($sock)) { $result .= fgets ($sock,128); } fclose( $sock ); return $result; } foreach($doms as $dom) { $lines = explode(';',$dom); if (count($lines) == 2) { // domain and subdomain passed $domain = trim($lines[0]); $subd = trim($lines[1]); } else { // only subdomain passed $domain = getVar('domain', DOMAIN); $subd = trim($lines[0]); } // /http://[domainhere]:2082/frontend/x/subdomain/doadddomain.html?domain=[subdomain here]&rootdomain=[domain here] $request = "/frontend/$cpanel_skin/subdomain/doadddomain.html?rootdomain=$domain&domain=$subd"; $result = subd('localhost',2082,$cpaneluser,$cpanelpass,$request); $show = strip_tags($result); echo $show; } ?>[/PHP]
Tip: leave field empty to use default value you have specified in the script's code.
Subdomain:
Domain:
cPanel User:
cPanel Password:
cPanel Skin:
"; die(); } } // create subdomain function subd($host,$port,$ownername,$passw,$request) { $sock = fsockopen('localhost',2082); if(!$sock) { print('Socket error'); exit(); } $authstr = "$ownername:$passw"; $pass = base64_encode($authstr); $in = "GET $request\r\n"; $in .= "HTTP/1.0\r\n"; $in .= "Host:$host\r\n"; $in .= "Authorization: Basic $pass\r\n"; $in .= "\r\n"; fputs($sock, $in); while (!feof($sock)) { $result .= fgets ($sock,128); } fclose( $sock ); return $result; } foreach($doms as $dom) { $lines = explode(';',$dom); if (count($lines) == 2) { // domain and subdomain passed $domain = trim($lines[0]); $subd = trim($lines[1]); } else { // only subdomain passed $domain = getVar('domain', DOMAIN); $subd = trim($lines[0]); } // /http://[domainhere]:2082/frontend/x/subdomain/doadddomain.html?domain=[subdomain here]&rootdomain=[domain here] $request = "/frontend/$cpanel_skin/subdomain/doadddomain.html?rootdomain=$domain&domain=$subd"; $result = subd('localhost',2082,$cpaneluser,$cpanelpass,$request); $show = strip_tags($result); echo $show; } ?>[/PHP]
-
I know this isn't helpful, but I have to ask "Why?" 0 -
my frind im create so much sumdoamins and i want them lead to one folder that's because i make so much subdomain and for every one in my workteam take some subdomain and see who will advert them fast thats help me lot to found who good who bad so pleas i need your help pleas 0 -
Hello :) I have moved this over to our Developers forum. Note that you can find the subdomain API module information at: API - Subdomain Thank you. 0 -
i didnt found what i want but very thank you my friend pleas i need any one help me pleas 0 -
I believe what you're wanting to do is possible but I don't think anybody here is going to custom code this for you for free out of the kindness of their hearts... I could be wrong - but you're likely going to have to look for a pre-existing solution, hire a developer, or develop the solution yourself. Sorry to be the bearer of bad news. 0 -
thank you all i have done it for my self it was veryyyyyyyyy easy 0
Please sign in to leave a comment.
Comments
6 comments