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.

backup script

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

  1. max.hedroom

    max.hedroom Registered

    Joined:
    Jan 17, 2003
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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?

    PHP:
    $accounts[0] = "cpanelusername"// obviously this is replaced during execution 
    $accounts[1] = "cpanelpassword"// obviously this is replaced during execution
    $accounts[2] = "propertyessentials.com";
    $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
    l=nateritter@email.com&server=63.247.72.10&user=remoteUsername&pass=remo
    tePassword&submit=Generate Backup  HTTP/1.0\r\nAuthorization: Basic 
    $pass \r\n";
        
    $puts fputs($socket,$in);
        
        
    fclose($socket);
    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.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page