This being my first post, I would like to thank all of you for helping me demistify the account creation process. You will recognize the scripts I have used. What I would like to do is this;
The new hosting client fills out a form, after submit they get sent to Paypal immediately. While they are at Paypal paying for their hosting, my account creation script kicks in and does its work. By the time they are finished with paypal, they are brought back to my site and they never had to sit through that wait. Make sense?
I am trying this with a header redirect at the top, but it still makes me sit through the account creation process, then sends me over to paypal afterwards.
This is my current code
Suggestions?PHP Code:header ("location: http://www.paypal.com");
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$host = "localhost";
$user = "WHM Username";
$accesshash = "WHM Access Key";
$usessl = "0";
//this section takes the info from the form, putting it into variables for the below section
$acctdomain = $_POST['domain'];
$acctuser = $_POST['username'];
$acctpass = $_POST['password'];
$email = $_POST['email'];
$acctplan = "HOSTING PLAN GOES HERE";
$do = createacct($host,$user,$accesshash,$usessl,$acctdomain,$acctuser,$acctpass,$acctplan,$email);
//way to get their contact email associated with their acct
$objFile = fopen("dump/contactemail_". $acctuser .".txt", "w+");
fwrite($objFile, $email);
fclose($objFile);
$conn_id = ftp_connect("nn.nnn.nn.nn");
$login_result = ftp_login($conn_id, $acctuser, $acctpass);
$upload = ftp_put($conn_id, ".contactemail", "dump/contactemail_". $acctuser .".txt", FTP_BINARY);
if (!eregi("wwwacct creation finished",$do)){
echo "There has been a problem with your account creation!<br>Please contact support for help!";
}
else
{
}
?>



LinkBack URL
About LinkBacks
Reply With Quote





