Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Creative Discussion > Programming and Game Development

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-27-2011, 07:15 PM
maximillion maximillion is offline
Member
 
Join Date: Jun 2011
Location: Rhode Island
Posts: 67
Gender: Male
Credits: 10,839
maximillion is on a distinguished road
Default php help please..

k, i have this site and on it i have links to text files, but normally when you click the link - the link opens the file in the browser... what i want is instead of viewing it, i want to make the text files downloads...

the reason for this is i made a word search puzzle maker, but i am also offering free puzzles you can download. the puzzles are txt files - so viewing them is not what i want, but instead for them to download them and put them in the apps puzzle folder so they can play them with the app.
__________________
Former owner/designer of a mafia game that i closed down after 7 years. i also do the following:

can fix most photos (wallets, 8x10, etc..)...
can code in vb 6.0...
html and some css...

made a couple of Nintendo DS games and working on more...

i want to learn php eventually...
Reply With Quote
  #2  
Old 09-28-2011, 09:32 AM
Inf3rnal's Avatar
Inf3rnal Inf3rnal is offline
Member
 
Join Date: Mar 2011
Location: Florida
Posts: 108
Gender: Male
Credits: 21,803
Inf3rnal is on a distinguished road
Default

There isn't a sure way to make links that will download. Those are processed on the browser depending on the users settings.

Try using buttons:
<form><input type="button" value="Download Now" onClick="window.location.href='Your.txt'"></form>

I haven't tested it but it's worth a shot.
Reply With Quote
  #3  
Old 11-11-2011, 02:30 PM
Csar Csar is offline
Member
 
Join Date: Oct 2011
Posts: 7
Gender: Male
Credits: 809
Csar is on a distinguished road
Default

Maybe this PHP Code helps:
<?
header('Content-Disposition: attachment; filename="downloaded.pdf"');
?>

It'll force the browser to display the file download dialog.
Reply With Quote
  #4  
Old 04-01-2013, 03:03 AM
Empress_Swanbottom's Avatar
Empress_Swanbottom Empress_Swanbottom is offline
Member
 
Join Date: Feb 2013
Posts: 48
Gender: Female
Credits: 8,755
Empress_Swanbottom is on a distinguished road
Default

Perhaps this'll help?
http://php.net/manual/en/function.readfile.php
__________________
Sorry about all the questions... :( I'm starting to feel like a total nuisance, but I am trying to find them in Google before I post them.
Reply With Quote
  #5  
Old 04-01-2013, 05:01 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 487,098
Hall of Famer is on a distinguished road
Default

Well the OP's last activity was in Oct 2011...
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 10:20 AM.

Currently Active Users: 698 (0 members and 698 guests)
Threads: 4,081, Posts: 32,029, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636