HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank
Google

Reply to topic Page 1 of 1
Downloads
Message  

Reply with quote
Post Downloads 
Hi ,

        Like downloading some free softwares we will be using some ftp servers or http servers.
So my question is that how can we provide the downloading option for the end user in php.

ex: like i want give the option do download some video clip for the users in my website.

How can i do this: If u have any ideas please post me.......

Thank you


_________________
Kotresh Kumar T
PHP Developer, Bangalore
View user's profile Send private message

Reply with quote
Post  
There are several options for that:

1) you can give a direct link
2) you can copy the needed file for download to a temporary directory through php programming and rename it as you need. then delete it using cron jobs
3) you can use header('location:myfile.mp3');
4) you can use this code for more security and reliability:

header("Content-type: application/download");
header("Content-disposition: attachment; filename=\"yourfile.mp3\"");

$fout = fopen(_VAR."pdf/newfilename.pdf", "r");

while ($buf = fread($fout, 4192)){
 echo $buf;
}
fclose($fout);

There may be several other ways or a combination of those I have listed.

Regards,
Pratamishus


_________________
www.eb-downloads.com
FREE E-BOOKS DOWNLOADS.
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

Reply with quote
Post  
would be great if we had more PHP tutorials and information on this forum.


_________________


Contact me on Skype.com Messenger is: VisionaryFuturist

Whole Sale Domain Names
http://www.wholesaleinternetsolutions.com

Human Growth Hormone
http://www.hgh.tv
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  



Google

FireFox! PHP Forum Web Designer Forum
Loans and Credit Web Host Forum Free Insurance Quotes!
Panama Search Engine Optimization Designer Children
Web Hosting Advertise Here $10 a Month Domain name registration
Affordable web-hosting Never Pay Taxes Again HGH
Web Hosting and Dedicated Servers Insurance


Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com