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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:06:50+00:00 2026-05-18T12:06:50+00:00

I want to download files, from an website using PHP. And i want to

  • 0

I want to download files, from an website using PHP.

And i want to create an php script to download files without going on their website to download files. I just want to pun their link on my script an download the file automatically.

I try with CURL, but doesn’t work…. The link is like this <a rel="nofollow" href="/download-15866-114621.srt"><b>Download</b></a>

the code :

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
  'http://subtitrari.regielive.ro/download-15866-114621.srt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$contents = curl_exec ($ch);
echo $contents;
curl_close ($ch);
  • 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-18T12:06:51+00:00Added an answer on May 18, 2026 at 12:06 pm

    I get “download failed!” as content, which means they probably have some sort of download protection. The best thing is probably to ask them what you should do (assuming you have their permission to download the file) or stop trying (assuming you don’t).

    Eitherway, try setting a referer header with CURLOPT_REFERER. Maybe they check that header to see that no-one is hotlinked to the file.

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

Sidebar

Related Questions

I want to enable the users of my website to download the files from
I'm writing a script to download multiple FLACs from a website, and I'm using
I want to download files from internet in my Android Native application. I was
I want to ask if I can download files from the blobstore in google
I want to ask if I can download files from the blobstore in google
All I have used osmdroid and i want to download map zip files from
i want maven to download custom jar files from an ftp how to set
I want to download an mp3 File from a Link on the Phone(Isolated Storage)
I have requirement where in i want to download the files from different machines
If I download a file from a website using: $html = file_get_html($url); Then how

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.