Saw Dave wanted something to make accounts so I thought i'd code this up if he liked it or not looool. Customize it to your wants and needs.
PHP Code:<?php
/**
* @author James Rozee
* @desc cPanel acc maker
*/
/* You need to edit the configurations below */
$cPanelVersion = 'x'; // eg :2082/frontend/x/ <-- version X skin for example.
$cPanelLogin = 'Name'; // Your cpanel login (username)
$cPanelPassword = 'Password'; // Your cpanel login (password)
$cPanelDomain = '92.48.100.21'; // your site or IP
$emailDomain = 'jamesrozee.com'; // if you want to make more available, you'll have to customize.
$emailQuota = 10; // in Meg
/* Im using GET to get the information this can be changed etc. */
if( $_GET[ 'username' ] == '' || $_GET[ 'password' ] == '' )
{
echo( 'Please go back and fill in all the details...' );
}
elseif( $_GET[ 'username' ] != '' || $_GET[ 'password' ] != '' )
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://' . $cPanelDomain . ':2082/frontend/' . $cPanelVersion . '/mail/doaddpop.html');
curl_setopt($ch, CURLOPT_USERPWD, $cPanelLogin . ':' . $cPanelPassword);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'email=' . $_GET[ 'username' ] . '&domain=' . $emailDomain . '&password=' . $_GET[ 'password' ] . '"a=' . $emailQuota);
$result = curl_exec($ch);
if( preg_match( '/exists/i', $result ) == true )
{
echo( 'Account taken' );
} else {
header( 'Location: wearedoneetc.html' );
}
curl_close($ch);
}
?>





Reply With Quote






.
