problems in dynamic craetion of subdomains in php -


hello creating subdomains in php following code.

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;  }  $domain="memories.mydomain.com";          $subd="abcdef";          $request ="frontend/x3/subdomain/doadddomain.html?domain=$subd&rootdomain=$domain&dir=public_html/$subd&go=create";          $host="ftp.mydomain.com";          $port="2083";          $ownername="ownername";          $passw="my_password";          $result=subd($host,$port,$ownername,$passw,$request);          $show = strip_tags($result);       $d="http://$subdomainname.$domain";             echo '<meta http-equiv="refresh" content="0; url='.$d.'">'; 

i seeing in cpanel sub-domain creating want redirect sob-domains when creation completed instead of subdomain redirecting error page http://abcdef.memories.mydomain.com/cgi-sys/defaultwebpage.cgi. problem behind it.why redirecting unsupported link.? thanks

wow, you're writing automated front end automated front end. why don't create subdomain directly in php script, , skip messing around cpanel?


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -