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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:46:32+00:00 2026-05-27T03:46:32+00:00

where in error? <? if($_GET[‘data’]) { print ‘atmam’; include (‘http://downloads.website.com/download/3725f5eea93437e9de52f9b15854f5c1’); } else { print

  • 0

where in error?

  <?
  if($_GET['data'])
  {
    print 'atmam';
include ('http://downloads.website.com/download/3725f5eea93437e9de52f9b15854f5c1');
  }
  else {
   print 'fail to download'; }
   ?>

Written on the screen error:

    Warning: Unexpected character in input: '' (ASCII=1) state=1 in                         http://downloads.website.com/download/3725f5eea93437e9de52f9b15854f5c1 on line 515

    Parse error: syntax error, unexpected T_STRING in http://downloads.website.com/download/3725f5eea93437e9de52f9b15854f5c1 on line 515

PS: http://downloads.website.com/download/3725f5eea93437e9de52f9b15854f5c1 = direct file download link

Can you help?
Best regards

  • 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-27T03:46:32+00:00Added an answer on May 27, 2026 at 3:46 am

    See if this does something like what you want:

    <?php
    
      if ($_GET['data']) {
    
        // Some headers that indicate a generic download
        header('Content-Type: application/octet-stream');
        header('Content-Disposition: attachment');
    
        // Try and read the file directly to the client
        if (!@readfile('http://downloads.website.com/download/3725f5eea93437e9de52f9b15854f5c1')) {
          // Try and clear the header and print a message. This may not work depending on the result of the readfile() attempt.
          @header('Content-Disposition:');
          print 'fail to download';
        }
    
        exit;
    
      }
    
    ?>
    

    An alternative (and many would argue better) approach is this:

    <?php
    
      if ($_GET['data']) {
    
        // Redirect the client to the actual location
        header('HTTP/1.1 302 Found');
        header('Location: http://downloads.website.com/download/3725f5eea93437e9de52f9b15854f5c1');
        exit;
    
      }
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After logged in, I am getting this error: GET http://0.0.0.0:3000/assets/images/ajax-loader.gif 404 (Not Found) error
I have this error: GET http://localhost/ejemplo/build/production/src/log/Logger.js?_dc=1343409099716 404 (Not Found) Logger.js:1 Uncaught Error: [Ext.Loader] Failed
Calling system() to run an external .exe and checking error code upon errors: #include
I would like to print out the cause of the error. error_get_last() doesn't seem
I get error: ORA-06575: Package or function GET_CONC_NAMES is in an invalid state When
The error I get is Xcode saying 3 things are un-declared (see below picture)
Why I get error with this query on my live server but not on
Why do I get error in this code?Even if i do not link but
Here is the error I get ArgumentError in External_articles#show Showing app/views/external_articles/show.html.erb where line #3
This is the error I get in my Apache error log: [Sun Aug 22

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.