naresh_nsk Posted November 6, 2006 Share Posted November 6, 2006 Hi,I am Naresh. I have created subdomain using phpscript. the following give below<?php################################################################Defining cPanel login info$cpaneluser="XXXX";$cpanelpass="92yyy";################################################################Sets subdomain to create$domain = "XXXgameonnYYYY.com";$subd = "naresh123.XXXgameonnYYYY.com";################################################################Tells where to go$request = "/frontend/x/subdomain/doadddomain.html?rootdomain=$domain&domain=$subd";//$request = "/frontend/x/subdomain/index.html?rootdomain=$domain&domain=$subd";//print $request."---";################################################################open socket$sock = fsockopen('gameonn.com',2082);############################################################### $authstr = "$cpaneluser:$cpanelpass";$pass = base64_encode($authstr);$in = "GET $request\r\n";$in .= "HTTP/1.0\r\n";$in .= "Host:localhost\r\n";$in .= "Authorization: Basic $pass\r\n";$in .= "\r\n";fputs($sock, $in);while (!feof($sock)) {$result .= fgets ($sock,128);}fclose( $sock );$show = strip_tags($result);//echo $show;?> we have successfully created a subdomain's dynamically. but created subdomain's need for full permissions using coding wise. In created subdomain' we need to move file called index.php. we have use copy command moving file to created subdomain' it throw permission denied problem.so we tried for chmod to give permission for the subdomain thats also not supported error throw.Please help me. This is important task for our project. Any one do this please how to do this and give example script.Regards,NARESH Link to comment Share on other sites More sharing options...
justsomeguy Posted November 6, 2006 Share Posted November 6, 2006 Check this: if (ini_get("safe_mode")) echo "PHP is running in safe mode";else echo "PHP is not in safe mode"; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now