Join Us!
  • WEB Hosting By Accu








Downloading a .txt file...

This is a discussion on Downloading a .txt file... within the Web Development forums, part of the Programming & Web Development category; I have a page and it gives download link to a something.txt... So when i click it, It goes ...


Reply
 
LinkBack Thread Tools
waseem's Avatar
BRL Addicted  
Posts : 51
Reputation : waseem is on a distinguished road
 
BRL$: 0
December 30th, 2009, 06:52 AM

Default Downloading a .txt file...


I have a page and it gives download link to a something.txt...

So when i click it, It goes to the file and views it online... But i want the visitors to download the file by just clicking it.

Hows that done???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Ads By Google

brl_admin's Avatar
Administrator  
Posts : 6,551
Reputation : brl_admin will become famous soon enough
 
BRL$: 64,190.01
December 30th, 2009, 09:15 AM

Default Re: Downloading a .txt file...


It is really dependent on the programming language you're using ... it is possible with php, asp, asp.net or cold fusion ... Which PL you're using ?
__________________
Jason p. - Administrator
High Quality Windows ASP.Net Web Hosting
Powerful Windows VPS Hosting
VPS Discussion Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
parsi81's Avatar
BRL Addicted  
Posts : 241
Reputation : parsi81 is on a distinguished road
 
BRL$: 0
January 12th, 2010, 03:28 AM

Default Re: Downloading a .txt file...


Quote:
Originally Posted by waseem View Post
I have a page and it gives download link to a something.txt...

So when i click it, It goes to the file and views it online... But i want the visitors to download the file by just clicking it.

Hows that done???
On every where if you are using and providing the txt link then it will open the txt file on web. You have to tell user - right click and Save the file. I think then only it will be saved.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
tyler13's Avatar
BRL Addicted  
Posts : 139
Reputation : tyler13 is on a distinguished road
 
BRL$: 0
January 17th, 2010, 17:38 PM

Default Re: Downloading a .txt file...


You can set HTTP headers that force download the file rather than auto open it. This is the sample code in php.

PHP Code:
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=\"filenamehere.txt\"); 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
.txt, downloading, file...


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to securely hide your file (Advance) GoycP How To's 0 August 6th, 2009 03:47 AM
How to Hide File In An Image (Vista Version) GoycP How To's 2 February 22nd, 2009 10:20 AM
Function to list file formats inside a ZIP file Rss_Feeds PHP 0 September 30th, 2007 01:16 AM
Guide:Help you to creat Flash Video much easily. moppet Web Designing 0 July 25th, 2007 03:42 AM
File Station - free file hosting. 5Gb online storage, 250Mb per file Rss_Feeds Free Web Hosting Offers 1 July 18th, 2007 04:09 AM

Downloading a .txt file...