cPanel Backup POST Issue
Hi,
I run the full cPanel account backup using PHP using the script below.
[PHP]$pass = base64_encode($array['cpuser"> . ":" . $array['cppass">);
$params = "dest=" . $array['ftpmode"> . "&email=" . $array['notifyemail"> . "&server=" . $array['ftphost"> . "&user=" . $array['ftpuser"> . "&pass=" . $array['ftppass"> . "&port=" . $array['ftpport"> . "&rdir=" . $array['ftpdir"> . "&submit=Generate Backup";
fputs($socket, "POST /frontend/" . $array['skin"> . "/backup/dofullbackup.html?" . $params . "HTTP/1.0\r\n");
fputs($socket, "Host:" . $array['domain"> . "\r\n");
fputs($socket, "Authorization:Basic " . $pass . "\r\n");
fputs($socket, "Connection:Close\r\n");
fputs($socket, "\r\n");[/PHP]
However when one of the fields passes over a symbol such as & or ?. Normally you would use the urlencode() function to stop this issue from happening. However because this would mean altering cPanel's source code I can't use this. Does anyone know any way to get around this issue?
Thanks
Pete
-
Hello :) This is an older thread, but you may find it helpful: Fileman::FullBackup XML-API Thank you. 0
Please sign in to leave a comment.
Comments
1 comment