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 8611971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:30:42+00:00 2026-06-12T04:30:42+00:00

What i really want to do is: User will upload to script from a

  • 0

What i really want to do is:

  • User will upload to script from a html page
  • The script will login and return back the link

Well, all can be easily done with the help of curl and accepting file through multipart post.

But the problem here is that it will start uploading the file from server to another through curl after all upload is done 🙁 So that will take a long process.
I was wondering whether its possible to make it like as user uploads files, it also keep sending the data in chunks like downloading a file

I am not sure whether this is even possible with php. If not, any other way through which this can be made possible

  • 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-06-12T04:30:44+00:00Added an answer on June 12, 2026 at 4:30 am

    You can do this using cURL:

    // Open a stream so that we stream the image download
    $localFile = $_FILES[$fileKey]['tmp_name'];
    
    $stream = fopen($localFile, 'r');
    
    // Create a curl handle to upload to the file server     
    $ch = curl_init($fileServer);
    // Send a PUT request
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
    // Let curl know that we are sending an entity body
    curl_setopt($ch, CURLOPT_UPLOAD, true);
    // Let curl know that we are using a chunked transfer encoding
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Transfer-Encoding: chunked'));
    // Use a callback to provide curl with data to transmit from the stream
    curl_setopt($ch, CURLOPT_READFUNCTION, function($ch, $fd, $length) use ($stream) {
        return fread($stream, $length) ? '';
    });
    
    curl_exec($ch);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Really simple question: From within GWT I want to forward the user away from
I need to read the user's fingerprint from my application. What I really want
I really want Resharper to format my line-wrapped ternaries in this way return navigator.IsTerminating
I want any php script which can demonstrate me how to upload multiple files
I want to provide a set of filters for a user to pick from,
I want to create a form with a number of textareas. The user will,
I want to create a new Rally user with the following C# code DynamicJsonObject
I really want to have full control of section headers by laying out in
I really want to get this to work, but I feel like I've been
I really want to know your experience at working with ADO.Net datasets (calling stored

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.