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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:51:59+00:00 2026-06-13T08:51:59+00:00

I am using wordpress for my website and there are some wallpapers in my

  • 0

I am using wordpress for my website and there are some wallpapers in my folder which i provide for download . But i dont want users to know the exact file location of folder . As there is a subscription for the download.

suppose my file is stored in

http://www.example.com/wp-content/example.folder/awesome.png

Now how to hide the folder name example.folder and use any fake name, That dosent shows up while downloading . Really need a big help on this. can anyone suggest me a good method. I tried some wordpress plugins , but no help on this.

  • 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-13T08:52:00+00:00Added an answer on June 13, 2026 at 8:52 am

    Example With PDF doc

    $nameOld = "/public_html/wp-content/example.folder/oldnme.pdf";
    $nameNew = "newName.pdf" ;
    header("Content-Transfer-Encoding: binary");
    header('Content-type: application/pdf');
    header("Content-disposition: attachment; filename=$nameNew"); //
    readfile($nameOld);
    

    Edit
    Prove of Concept for your image system using download.php?img=flower without the extension and flower show be the image name

    $directory = "/public_html/wp-content/example.folder/";
    $types = array("jpg","gif","png");
    $ext = null;
    
    if (! isset($_GET['img'])) {
        die("Invalid URL");
    }
    
    $nameOld = filter_var($_GET['img'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_LOW);
    $nameNew = uniqid(basename($nameOld));
    
    // File the file
    foreach ( $types as $type ) {
        if (is_file($nameOld . "." . $type)) {
            $ext = $type;
            break;
        }
    }
    
    if ($ext == null) {
        die("Sorry Image Not Found");
    }
    $nameOld .= "." . $ext;
    $type = image_type_to_mime_type(exif_imagetype($nameOld));
    
    header("Content-Transfer-Encoding: binary");
    header('Content-type: ' . $type);
    header("Content-disposition: attachment; filename=$nameNew"); //
    readfile($nameOld);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to display on my Wordpress website using MapMyFitness's API. It needs to
I am using WPMU but there are some options that the administrator should set
I want to develop a personal blogging website using ASP.NET MVC 4. I know
I'm putting the final touch to my friend's portfolio website (using wordpress) but I'm
I'm making a simple website for myself using wordpress and some hacking to try
I'm using this code with success on some wordpress installation, but with my new
I'm using WordPress to make my users make their own website/blog. I have a
Im using wordpress for my website and i have a massive amount of data
I am using wordpress as my cms and building a website. I use Graphene
I am planning a new website with codeigniter using wordpress. this site will contain

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.