Jump to content

naresh_nsk

Members
  • Posts

    2
  • Joined

  • Last visited

naresh_nsk's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. 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
  2. Hi, I am Naresh. I have created a subdomin in coding, but in the subdomain folder inside we need to move file index.php. That time it throw permission denied problem. suppose i have give permissions for FTP through right click and change CHMOD to give permission means its working.But in the php coding function chmod ("naresh",0777) given its not working. Its through operation not supported." Warning: chmod failed: Operation not permitted in /var/www/html/Gameonn/chmod.php on line 3" Mainly i need for dynamic give the permission.Please help me any one do this how to do advise me.Regards,Naresh
×
×
  • Create New...