Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6664759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:38:48+00:00 2026-05-26T02:38:48+00:00

I have an Apache server running on a client’s computer, with PHP installed. I

  • 0

I have an Apache server running on a client’s computer, with PHP installed. I have scheduled a task to automatically create a database backup, and it’s working fine. But it makes no sense keeping the backups on the same HD the system’s running, so I have to send it somewhere else.

At first, I tried doing a PHP FTP Upload, but the client’s firewall’s blocking all FTP connections, and I cannot unblock it (his company won’t allow me).

Then, I tried sending the backup using SMTP, to an e-mail account. Also didn’t work. All SMTP connections are also blocked (I know…).

I’m trying now to access a webpage (on my server), via a HTTP POST REQUEST, with the file attached on the page-header. It should be possible, seeing that’s pretty much what the browser does, with a file-input object, right? I just sends the multipart/data using the page header.

Will I have to create the page header manually? Or are there any scripts that already do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:38:48+00:00Added an answer on May 26, 2026 at 2:38 am

    You can use curl to send it via http. Assuming your file is ‘/tmp/backup.tar.gz’, it’d be:

    $ch = curl_init('http://clientserver.com/upload.php');
    $ch = curl_setopt($ch, CURLOPT_POST, true);
    $ch = curl_setopt($ch, CURLOPT_POSTFIELDS, array('file' => '@/tmp/backup.tar.gz'));
    $ch = curl_setopt($ch, CURLOPT_USERPWD, 'username:password');
    
    $result = curl_exec($ch);
    if ($result === FALSE) {
       die(curl_error($ch));
    }
    

    That’s the basics. you’d probably need to make it a bit more robust. Assuming the upload script on the receiving server is done in php, you’d access the file as $_FILES['file'].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On one Linux Server running Apache and PHP 5, we have multiple Virtual Hosts
I have a php script http://example.com/myapp/myscript.php running on an Apache server. I call this
I have an existing PHP app running on Apache server. Question, is it possible
I have my Apache http server running on localhost:80 and restlet server on localhost:8182,
I have Apache 2 running on a VPS server (running Debian). I recently changed
I have Apache running on a public-facing Debian server, and am a bit worried
I have Apache/SVN running on Windows Server 2003 with authentication via LDAP/Active Directory and
I have a server running Gentoo 2.6.12 r6 and I want to run Apache
I'm running an Apache server (v2.2.10) with mod_python, Python 2.5 and Django. I have
I have apache web server installed as frontend and I have j2ee SAP Netweaver

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.