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

  • SEARCH
  • Home
  • 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 255891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:58:06+00:00 2026-05-11T21:58:06+00:00

I was wondering if there was any way in PHP to pass an external

  • 0

I was wondering if there was any way in PHP to pass an external download off to a user? What I would like to do with the script is depending on certain conditions, send the user a file from server A or server B. However, I don’t want the user to know the direct url to either server.

Ex:
User visits (which is on server C): http://example.com/download?id=1234
Server A’s Address to file: http://servera.com/1234.exe
Server B’s Address to file: http://serverb.com/1234.exe

Is there a way, that when someone visits http://example.com/download?id=1234, to send them the download of the other servers without giving the user the direct URL? I know I can do a file([external file here]). But I do not want all the bandwidth going through server C. Server C is pretty much just a redirect.

Thanks,
James

  • 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-11T21:58:06+00:00Added an answer on May 11, 2026 at 9:58 pm

    The client must know at some level which server they are downloading from, otherwise they wouldn’t be able to connect to it.

    EDIT:

    If you don’t want the address bar of the browser to change, you can try using the Content-disposition header like so:

    header("Content-disposition: attachment;filename=1234.exe");
    //then output the file contents
    

    Note: this PHP script has to be on server A and server B. So server C will redirect to either http://servera.com/download.php or http://serverb.com/download.php.

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

Sidebar

Related Questions

I am wondering is there any way to execute following shell script, which waits
I am wondering if there is any way to pass in a value when
I was wondering if there was any way through php or javascript I could
I was wondering if there is any way to notify a user in adobe
I am wondering if there is a way I can pass an updated PHP
I was wondering if there's any way of inserting a PHP variable in HTML
Just wondering is there any way I can check whether the url links to
I am wondering is there any way we can test the font size/color of
Wondering if there is any way to get the lambda expressions that result from
Just wondering if there is any way to get the NS records in C#.

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.