Hi
I have got a working script to :
Create a database
Add permissions
Upload user details
Above is a very basic version of my code but it works very well and would like to stick to this principle.
What I would like is somebody to have a look at the "A" record upload as I cant just get it working.
Ive had a good go but there must be something I am missing.
Very sorry im not the best at this.
Regards
Ben
I have got a working script to :
Create a database
Add permissions
Upload user details
PHP:
<?php
// Your cPanel username
$cpanel_user = 'USER';
// Your cPanel password
$cpanel_pass = 'PASSWORD';
// Your cPanel skin
$cpanel_skin = 'x3';
// Your cPanel domain
$cpanel_host = 'DOMAINHOSTING';
// database username
$db_user = 'sql';
// database password
$db_pass = 'PASSWORD';
$db_name='00034';
// create the database
$site = "https://$cpanel_user:[email protected]$cpanel_host:2083/frontend/$cpanel_skin/sql/";
$result = file_get_contents("{$site}addb.html?db={$cpanel_user}_{$db_name}");
$result = file_get_contents("{$site}addusertodb.html?user={$cpanel_user}_{$db_user}&db={$cpanel_user}_{$db_name}&ALL=ALL");
?>
What I would like is somebody to have a look at the "A" record upload as I cant just get it working.
PHP:
<?php
// Your cPanel username
$cpanel_user = 'USER';
// Your cPanel password
$cpanel_pass = 'PASSWORD';
// Your cPanel skin
$cpanel_skin = 'x3';
// Your cPanel domain
$cpanel_host = 'DOMAINHOSTING';
// Domain
$zone_domain = 'WEB';
// Your SubDomain
$zone_name = 'test';
// Your Record
$zone_record = 'A';
// Your Ip
$zone_ip = '179.254.0.0';
// create the Zone
$site = "https://$cpanel_user:[email protected]$cpanel_host:2083/frontend/$cpanel_skin/zoneedit/";
$result = file_get_contents("{$site}advanced.html?db=domain={$zone_domain}&name={$zone_name}&type={$zone_record}&address={$zone_ip}");
?>
Very sorry im not the best at this.
Regards
Ben