The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page