99 posts
  • Belgium
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 1 000 and 5 000 dollars
krike says

I’m working on a shop system, based on this shop (well… most part).

anyway I don’t really have a problem, everything works but I wanted to ask something. I want the direct download link hidden behind another url eg: www.yoursite.com/shop/downloads/542136879

this is the code: header("Content-type: application/$extension"); header("Content-Length: $len"); header("Content-Disposition: inline; filename=".str_replace(' ', '_', $filename).".zip");

that works and it will download a zip, however IE (of course) and chrome download it as a blank document (without the extention, can’t seem to find it)

so what I did (see in the code block) I hardcoded the .zip in the filename and it works in all browsers

is this a bad thing to do?

426 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 5 000 and 10 000 dollars
  • United States
vasilios says

I don’t see how “hand coding” in ”.zip” is bad. :o

Unless $extension holds ”.zip”, then just use that. ;)

753 posts
  • Sold between 10 000 and 50 000 dollars
  • Referred between 10 and 49 users
  • Author had a Free File of the Month
  • Exclusive Author
  • Has been a member for 5-6 years
  • Bought between 1 and 9 items
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
AdamGold says
99 posts
  • Belgium
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 1 000 and 5 000 dollars
krike says
http://themeforest.net/item/membersitems/49975 :P

the shop I’m working on is based on this shop system except that members will not be able to add items but only buy them. and there will be 2 versions available in the download, one with paypal checkout and another which can be added to the deposit script I’ve written http://themeforest.net/item/deposit-system/59753

both are to be integrated in whatever website you allready use. No membership system provided but very easy to integrate. So it’s a bit different from yours :D

nice work btw :)

753 posts
  • Sold between 10 000 and 50 000 dollars
  • Referred between 10 and 49 users
  • Author had a Free File of the Month
  • Exclusive Author
  • Has been a member for 5-6 years
  • Bought between 1 and 9 items
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
AdamGold says

Oh cool. Good luck! :)

99 posts
  • Belgium
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 10 and 49 users
  • Sold between 1 000 and 5 000 dollars
krike says
Oh cool. Good luck! :)

thanks :) I’ve you want to have a look at it -> http://cmstutorials.org/shop/index/

the first 3 categories are cats I’m going to use and the 2 others is me testing in the admin panel adding categories and subcategories (which works)

by
by
by
by
by
by