I'll give this away since I can't use it no more.(
HTML below 4 form.PHP Code:<?php
session_start();
$whm_username = "root";
$whm_password = "changeme";
$formarray = array("username", "password", "domain", "address", "name", "image", "email");
// check fields.
$number = 0;
for($x = 0; $x < sizeof($formarray); $x++) {
if($_POST[$formarray[$x]] == "") {
$result = $result."Your missing data for ".$formarray[$x]."<br>";
} elseif($_POST[$formarray[$x]] != "") {
$number++;
}
}
// check all fields correct, then check the imagevars
if($number == sizeof($formarray)) {
if($_SESSION['img'] == $_POST['image']) {
$ch = curl_init(); // INIT Curl
$domains = array(".driftpanzy.co.uk", ".jamesrozee.com", ".kg-hosting.co.uk", "");
for($i = 0; $i < sizeof($domains); $i++) {
if($_POST["domainEXT"] == $i) {
$domain = $_POST["domain"].$domains[$i];
}
}
$whm = "http://kg-hosting.co.uk:2086/scripts/wwwacct?plan=FREEHOSTING&domain=".$domain."&username=".$_POST['username']."&password=".$_POST['password']."&contactemail=".$_POST["email"];
curl_setopt($ch, CURLOPT_URL, $whm);
curl_setopt($ch, CURLOPT_USERPWD, $whm_username.":".$whm_password);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$clean = curl_exec($ch);
if(preg_match("/Account Creation Status: failed/i", $clean) == true) {
echo('<font face="tahoma" size="2">'."Either, your username was taken or invalid (over 8 chars) or the server doesn't like what you entered."."</font>");
} elseif(preg_match("/sorry thats not a valid domain/i", $clean) == true) {
echo('<font face="tahoma" size="2">'."The domain you provided wasn't valid."."</font>");
exit;
} elseif(preg_match("/New Account Info/i", $clean) == true) {
echo('<font face="tahoma" size="2">'."The account was created successfully!"."</font>");
} else {
echo('<font face="tahoma" size="2">'."An error happened across the line and can't be identified. If your account info is listed below, it was a successful account build else you need to contact me [email protected]"."</font>");
}
$lastbit = explode('+===================================+', $clean);
$clean = str_replace("| ", "<br>", $lastbit[2]);
echo('<font face="tahoma" size="2">'.$clean."</font>");
curl_close($ch);
session_destroy();
} else {
echo('<font face="tahoma" size="2">'.$result."Your image verification wasn't correct, please try again.<br>"."</font>");
}
} else {
echo('<font face="tahoma" size="2">'.$result."</font>");
}
?>
Yeah I receive there Name/Address and my script e-mailed it to my inbox, but you can mess around. Can only created SHARED hosting accounts, works on ROOT WHM and Resellers.HTML Code:<form name="submitAcc" action="process.php" method="post"> <div class="tag">Username:<input maxlength="8" class="dpbox" type="text" name="username"></div><br> <div class="tag">Password:<input class="dpbox" type="password" name="password"></div><br> <div class="tag">Domain:<input class="dpbox" type="text" name="domain"><select class="dpbox1" name="domainEXT"> <option value="x">Select Domain Option</option> <option value="0">.DriftPanzy.co.uk</option> <option value="1">.JamesRozee.com</option> <option value="2">.KG-Hosting.co.uk</option> <option value="3">Parked Domain</option> </select></div><br> <div class="tag">Valid Email:<input class="dpbox" type="text" name="email"></div><br> <div class="tag">Real Name:<input class="dpbox" type="text" name="name"></div><br> <div class="tag">Home Address:<textarea class="dpboxx" name="address"></textarea></div><br><br><br> <div class="tag">Image Verification:<input class="dpbox" type="text" name="image"><img style="position: absolute; left: 325px;" src="http://www.jamesrozee.com/img.php"></div><br> <input class="dpbox" type="submit" value="Create Account!"><br> </form>
Yeah criticize my code you tards I don't care.





(
Reply With Quote
3 thanks.

