A selection of BBCodes for use on your phpBB3 Forums.
man128
Forum Member
Posts: 23 Joined: Fri Jun 06, 2008 7:30 pm
Post
by man128 » Wed Jun 03, 2009 4:16 pm
I have seen alot of force download php code out there that will force the download box to appear and download any file on internet explorer and prevent media player from opening.
here is what i have found.
http://elouai.com/force-download.php
<?php
// force to download a file
$file = "
http://localhost/test/".$_GET ['file']."";
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header( "Content-Disposition: attachment; filename=".basename($file));
header( "Content-Description: File Transfer");
@readfile($file);
?>
man128
Forum Member
Posts: 23 Joined: Fri Jun 06, 2008 7:30 pm
Post
by man128 » Sun Jun 07, 2009 11:48 pm
Can anybody try to figure out a way to convert the above code into a bbcode?
cisco007
Staff
Posts: 501 Joined: Tue Oct 07, 2008 3:44 am
Post
by cisco007 » Mon Jun 08, 2009 10:14 pm
i don't know if you can make that into a bbcode, you need html and java to make a bbcode, don't know if you can do it with php!
What do you think LDM?
Ashley
Forum Member
Posts: 242 Joined: Fri May 30, 2008 10:15 pm
Post
by Ashley » Mon Jun 15, 2009 8:12 pm
If it is a divx file they are downloading, won't their player prompt them to download the codec anyway?
man128
Forum Member
Posts: 23 Joined: Fri Jun 06, 2008 7:30 pm
Post
by man128 » Wed Jun 17, 2009 2:14 pm
It is not a Divx file, it is a .avi file. Everytime they try to click the file to download it opens up their media player instead.
LDM
Site Admin
Posts: 1786 Joined: Thu May 29, 2008 6:51 pm
Post
by LDM » Fri Jun 19, 2009 5:44 pm
Isn't that what you want it to do though? It may be different depending on what player they have set up to play avi files.
Looney
Forum Member
Posts: 2 Joined: Tue Nov 17, 2009 10:33 pm
Post
by Looney » Wed Nov 18, 2009 4:47 am
How can you make the text appear below the image?
LDM
Site Admin
Posts: 1786 Joined: Thu May 29, 2008 6:51 pm
Post
by LDM » Wed Nov 18, 2009 3:13 pm
Try this for your html instead for text under. Not tested so may have to post if not working.
HTML:
Code: Select all
<table>
<tr>
<td title="Download Here !!" onclick="window.location.href='{URL}'" style="cursor:pointer;"><span onmouseover="this.style.color ='#FF0000';" style="font-weight: normal; font-size: 11px; color: #000000; font-family: Arial;" onmouseout="this.style.color='#000000';"><b> Download Here !!</b></span></td>
<td title="Download Here !!" onclick="window.location.href='{URL}'" style="cursor:pointer;"><img src="images/download.png" alt="" /></td>
</tr>
</table>
Looney
Forum Member
Posts: 2 Joined: Tue Nov 17, 2009 10:33 pm
Post
by Looney » Wed Nov 18, 2009 4:26 pm
Tested it and the text went bottom left but not below the image. Thanks for your time LDM, appreciate it alot
the4thmoz
Forum Member
Posts: 1 Joined: Mon Apr 05, 2010 7:59 am
Post
by the4thmoz » Mon Apr 05, 2010 8:01 am
Thx verry much
NeoFury
Forum Member
Posts: 5 Joined: Thu Jun 03, 2010 1:36 pm
Post
by NeoFury » Thu Jun 03, 2010 1:40 pm
awesome, thanks!