if i run code. it doesn't add cron to cpanel.
port 2082 can using api ?
(i don’t speak very good english, I m thai ^_^)
port 2082 can using api ?
(i don’t speak very good english, I m thai ^_^)
Code:
include("xmlapi.php");
$ip = " ";
$cpuser = " ";
$cppass = " ";
$xmlapi = new xmlapi($ip);
$xmlapi->set_port(2082);
$xmlapi->password_auth($cpuser,$cppass);
$xmlapi->set_debug(1);
$args = array('php /home/myuser/public_html/CronTask.php >/dev/null 2>&1','*','*', '*', '*','*');
$xmlapi->api2_query($cpuser, 'Cron','add_line', $args);