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!

backup script

Discussion in 'User Experience' started by max.hedroom, Sep 15, 2003.

  1. max.hedroom

    max.hedroom Registered

    Jan 17, 2003
    Likes Received:
    Trophy Points:
    I'm attempting to run this PHP script as a cron job but for some reason it's not working. Can you guys shed any light on what may be wrong?

    $accounts[0] = "cpanelusername"// obviously this is replaced during execution 
    $accounts[1] = "cpanelpassword"// obviously this is replaced during execution
    $accounts[2] = "";
    $accounts[3] = "x2";        // cPanel skin I'm using

    $socket fsockopen($accounts[2],2082);
        if (!
    $socket) { $err "socket not opened"; }

    $authstr $accounts[0].":".$accounts[1];    
    $pass base64_encode($pass);
    // please disregard the word wrapping.
    $in "POST /frontend/".$accounts[3]."/backup/dofullbackup.html?dest=passiveftp&emai
    tePassword&submit=Generate Backup  HTTP/1.0\r\nAuthorization: Basic 
    $pass \r\n";
    $puts fputs($socket,$in);
    Please understand that the fact I'm using an array is not important here. I am giving you the basic code I'm using.

    Thank you for any help you can give me. Support Ticket Number:

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