Welcome to my blog, hope you enjoy reading
RSS

Wednesday, 29 October 2014

Contact

Mail: sandeepcharan.praisetechnosoft@gmail.com

Publishing

Create Sub Domains Using PHP

<!DOCTYPE><html><head><meta charset="utf-8" /><title>How to create dynamic subdomain in PHP</title> <meta content="earn how to create sub domain dynamically according user details in PHP. Tutorial to create sub domain in PHP." name="description"  /><meta name="google-site-verification" content="liGddaK7I8_x0tSdKv36CRi_rMfRt3yMNjILkbOAxxY" /><link ref='http://feeds2.feedburner.com/webinfopedia' rel='alternate' title='Webinfopedia-Learn SEO, Web Designing and Web development easily with example and demos' type='application/rss+xml'/><meta name="msvalidate.01" content="CBFD6FA96646CD69CE09C869B2F6313" /><META name="y_key" content="2e447c925218040f" /><link rel="search" type="pplication/opensearchdescription+xml" href="http://www.webinfopedia.com/classes/opensearch.xml" title="SEO,PHP and Ajax blog" /> <meta content="create subdomain,create subdomain PHP, PHP create subdomain, Dynamic Subdomain, create HP subdomain, subdomain create script, Script to crate subdmain, how to subdomain" name="keywords"  /><link rel="tylesheet" type="text/css" href="css/fb-notfication.css" media="screen" /><meta name="author" content="webinfopedia" /<meta name="copyright" content="webinfopedia.com" /><meta name="Robots" content="index, follow" /><meta name="language" content="English" /><link rel="icon" type="image/x-icon" href="http://www.webinfopedia.com/favicon.ico" /><script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;   po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);  })();</script>
</head>
<body>
<?php
$sub=$_POST['sub'];
//Set the name for your New Sub Domain
$subDomainname="$sub";

//cPanel Username
$cPanelUserName="XXX";

//cPanel Password
$cPanelPassName="XXX";

//Main Domain Name
$rootDomainName="XXX";


//Function to create subdomain
function create_subdomain($subDomain,$cPanelUser,$cPanelPass,$rootDomain) {

//Generate URL for access the subdomain creation in cPanel through PHP
$buildRequest = "/frontend/x3/subdomain/doadddomain.html?rootdomain=" . $rootDomain . "&domain=" . $subDomain . "&dir=public_html/subdomains/" . $subDomain;

//Open the socket
$openSocket = fsockopen('localhost',2082);
if(!$openSocket) {
//SHow error
return "Socket error";
exit();
}

//Login Details
$authString = $cPanelUser . ":" . $cPanelPass;

//Encrypt the Login Details
$authPass = base64_encode($authString);

//Request to Server using GET method
$buildHeaders  = "GET " . $buildRequest ."\r\n";

//HTTP
$buildHeaders .= "HTTP/1.0\r\n";
//Define Host
$buildHeaders .= "Host:localhost\r\n";

//Request Authorization
$buildHeaders .= "Authorization: Basic " . $authPass . "\r\n";
$buildHeaders .= "\r\n";

//fputs
fputs($openSocket, $buildHeaders);
while(!feof($openSocket)) {
fgets($openSocket,128);
}
fclose($openSocket);

//Return the New SUbdomain with full URL
$newDomain = "http://" . $subDomain . "." . $rootDomain . "/";

//return with Message
return "Created subdomain $newDomain";

}

//Call the subdomain creator function
echo create_subdomain($subDomainname,$cPanelUserName,$cPanelPassName,$rootDomainName);
?>
<form name="subdomain" action="" method="post">
Your Domain Name:<input type="text" name="sub" value="" required>
<input type="submit" name="submit" value="Create">
</form>
</body>
</html>


Note: Replace XXX with your control panel login details.

Wednesday, 22 July 2009

Biography


The Early Years

           Sandeep was born on 12th April 1987 in Guntur, Andhrapradesh, India to his parents Sh.V.S.Hari Prasad and Smt. Rajini, He spent his life in the same place for 5 years after that he shifted to other place where his father doing business. His schooling and college in same place he has one sister(Married) and no brothers.

Graduation

            He got B.tech degree from JNTU Kakinada in the stream of Computer Science And Engineering on 2009. 

Profession

            After completing B.tech he worked as Software Engineer in Mahindra Satya for 1Year, After that he resigned his job and Searching new one and mean while he worked for TATADOCOMO, IBS, Varner Inc and CYBATE INFOTECH.  

Likes

Food: Chocolates, ice creams, prawns, chicken(bone less), potato fry, ladies finger fry and bitter guard.

Vehicles: Pulser, Yamaha R6, R7, Honda City and Nissan Sunny.

Movies: Checkde India, Oy! and Darling.

Places: Ooty,  kanyakumari, codai cenal, Dwaraka, Araku and Lambasinghi.

Temples: Srisailam, Sabarimala, Palani, Madhurai, Tirupati and Srikalahasti.