• Resolved bl4cki

    (@bl4cki)


    Hey guys,
    is it possible to realise downloads with headers in WordPress too or is it just possible to link a file?

    I hope you understand what i mean..

    Greetings and thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • We don’t understand “downloads with headers”. PHP headers?

    Thread Starter bl4cki

    (@bl4cki)

    Yes, with PHP headers, sorry for the bad explanation i’m not so good in english.

    Ok, but PHP headers to show what? HTTP headers? Like:

    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Transfer-Encoding: binary');
    header('Connection: Keep-Alive');

    You can do that with a page template.

    Thread Starter bl4cki

    (@bl4cki)

    Yes like this, to initiate a Download. Thanks i’ll try it out! 🙂

    You could link to a page template that only contains the headers you need and a link to the file, as you don’t want those headers on the main page template.

    You can also force download files via mimetypes in .htaccess.

    Thread Starter bl4cki

    (@bl4cki)

    Thanks it was really helpful I did it with a page template ! 🙂
    Closed then.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Downloads over PHP’ is closed to new replies.