1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Download code for gallery script

Discussion in 'PHP' started by yusiyuseff, Nov 17, 2008.

  1. #1
    i am using zenphot and webalbum for a wallpaper site i have a link that says download but it opends the image in a new page i want it to download the file not open in a new page can you give me the code

    thanks in advange
    SEMrush
     
    yusiyuseff, Nov 17, 2008 IP
    SEMrush
  2. atlantaazfinest

    atlantaazfinest Peon

    Messages:
    389
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <?php
    header('Content-type: application/octet-stream');
    header('Content-Disposition: attachment; filename="filename.ext"');
    readfile('filename.ext');
    ?>
    you can change filename.ext to variables
     
    atlantaazfinest, Nov 17, 2008 IP