Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

cPanel Backup POST Issue

Discussion in 'cPanel Developers' started by peterk92, Oct 4, 2014.

  1. peterk92

    peterk92 Member

    Joined:
    Nov 14, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    151
    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");
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,961
    Likes Received:
    1,821
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice