Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | anyone got a crack

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion
Register FAQ Community Calendar

megaupload.com Question on Effect
Reply
 
Thread Tools
Old 23-10-2005, 12:49   #1
JediMaster
Inactive
 
JediMaster's Avatar
 
Join Date: Jan 2004
Location: Swansea
Posts: 1,376
JediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these parts
Question megaupload.com Question on Effect

On http://www.megaupload.com they have a Feature I liked, but cant see HOW to do it

On this URL http://www.megaupload.com/?d=4KP1UGVA you wait 40 seconds then you can SAVE the File. I dont want that part... Next BIT I like....

1) There is a Button (like a Form Submit one)
2) Click the Button to SAVE File
3) When Pressed a POP-UP "Save Dialouge Box" opens

I dont want a Link & Save As Target, but a Button to LEFT Click & then it opens a Save Box..

Any ideas
JediMaster is offline   Reply With Quote
Advertisement
Old 23-10-2005, 12:52   #2
LemonyBrainAid
Inactive
 
Join Date: Jul 2004
Location: 127.0.0.1
Services: 50MB Virgin w/ TiVo 1TB
Posts: 1,255
LemonyBrainAid has a bronze arrayLemonyBrainAid has a bronze arrayLemonyBrainAid has a bronze array
LemonyBrainAid has a bronze arrayLemonyBrainAid has a bronze arrayLemonyBrainAid has a bronze arrayLemonyBrainAid has a bronze array
Re: megaupload.com Question on Effect

Surely the save dialogue box is the same as left clicking it... Just megaupload do it automatically for you...

Personally megaupload gives me too slow speeds
__________________
Emancipate yourselves from mental slavery, none but ourselves can free our minds - Bob Marley


LemonyBrainAid is offline   Reply With Quote
Old 23-10-2005, 13:14   #3
Stuart
-
 
Stuart's Avatar
 
Join Date: Jun 2003
Location: Somewhere
Services: Virgin for TV and Internet, BT for phone
Posts: 26,546
Stuart has a lot of silver blingStuart has a lot of silver blingStuart has a lot of silver blingStuart has a lot of silver blingStuart has a lot of silver bling
Stuart has a lot of silver blingStuart has a lot of silver blingStuart has a lot of silver blingStuart has a lot of silver blingStuart has a lot of silver blingStuart has a lot of silver blingStuart has a lot of silver blingStuart has a lot of silver bling
Re: megaupload.com Question on Effect

And has FAR to many popups..
Stuart is offline   Reply With Quote
Old 23-10-2005, 13:26   #4
Graham M
Inactive
 
Graham M's Avatar
 
Join Date: Jul 2003
Location: Poole, Dorset
Age: 41
Services: FreeSat+ Tivo V-Box VM 60MBit
Posts: 13,365
Graham M has a pair of shiny starsGraham M has a pair of shiny stars
Graham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny starsGraham M has a pair of shiny stars
Send a message via MSN to Graham M Send a message via Yahoo to Graham M
Re: megaupload.com Question on Effect

Its probably something to do with the Mime types on the server, theyve probably set it as something that doesnt display directly in your browser for everything and therefor it just straight downloads.
Graham M is offline   Reply With Quote
Old 23-10-2005, 13:27   #5
JediMaster
Inactive
 
JediMaster's Avatar
 
Join Date: Jan 2004
Location: Swansea
Posts: 1,376
JediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these parts
Re: megaupload.com Question on Effect

If you "Left Click" a Link on a site it OPENS from Location... But on the site I linked has a Download Box & then when you LEFT click it, it opens a Save As box. Not open from Location...

Yeah slow & popups. But the Button I want (not adverts & slow) lol

---------

Is there a Script/Code to use that will re-create this effect without editing MIME types
JediMaster is offline   Reply With Quote
Old 23-10-2005, 13:43   #6
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: megaupload.com Question on Effect

You would do it like this:


Code:
<script language="javascript">

function savefile() {

window.location="http://ww.site.com/files/file.ext";

}

</script>

<input type="button" value="Download this file..." name="savefile" onclick="savefile()">
punky is offline   Reply With Quote
Old 23-10-2005, 13:52   #7
JediMaster
Inactive
 
JediMaster's Avatar
 
Join Date: Jan 2004
Location: Swansea
Posts: 1,376
JediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these parts
Re: megaupload.com Question on Effect

punky
I was so PLEASED... But it works with .zip (that works with Left Click Link anyway)
I want to save a AVI/MPEG via a Button if you can try a way to do it?
JediMaster is offline   Reply With Quote
Old 23-10-2005, 13:58   #8
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: megaupload.com Question on Effect

Oh right you want to override a MIME type saved in a browser. You can't do that in Javascript, but you apparently can in PHP.

Here's an example.

http://forums.dreamincode.net/showtopic9446.htm

Follow that, and use the code I wrote above to open the .php file you create.
punky is offline   Reply With Quote
Old 23-10-2005, 14:06   #9
JediMaster
Inactive
 
JediMaster's Avatar
 
Join Date: Jan 2004
Location: Swansea
Posts: 1,376
JediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these parts
Re: megaupload.com Question on Effect

Cheers Buddy...

To Re-Cap..

in .htaccess file
Code:
<Files mp3>
ForceType application/x-httpd-php
</Files>
Then... (edit /path/to/mp3/files/ to Folder Path)

Code:
<?php
$uri = explode("/",$_SERVER['PATH_INFO']);
$path = "/path/to/mp3/files/"; //path without any filenames!!! Must have trailing backslash
header("Content-Description: File Transfer");
header("Content-Type: application/force-download");
header("Content-Disposition: attachment; filename=".basename($path.$uri[1]));
@readfile($path.$uri[1]);
?>
& add this to the same Page...

Code:
<script language="javascript">
function savefile() {window.location=http://ww.site.com/files/file.ext;}
</script>

<input type="button" value="Download this file..." name="savefile" onclick="savefile()">
Is that correct?
JediMaster is offline   Reply With Quote
Old 23-10-2005, 14:35   #10
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: megaupload.com Question on Effect

Actually, that example doesn't look totally clear.

Here is a clearer example, from the PHP docs, so its more trustworthy.

PHP Code:
           $filename = 'dummy.zip';
           
$filename = realpath($filename);

           
$file_extension = strtolower(substr(strrchr($filename,"."),1));

           switch (
$file_extension) {
               case 
"pdf": $ctype="application/pdf"; break;
               case 
"exe": $ctype="application/octet-stream"; break;
               case 
"zip": $ctype="application/zip"; break;
               case 
"doc": $ctype="application/msword"; break;
               case 
"xls": $ctype="application/vnd.ms-excel"; break;
               case 
"ppt": $ctype="application/vnd.ms-powerpoint"; break;
               case 
"gif": $ctype="image/gif"; break;
               case 
"png": $ctype="image/png"; break;
               case 
"jpe": case "jpeg":
               case 
"jpg": $ctype="image/jpg"; break;
               default: 
$ctype="application/force-download";
           }

           if (!
file_exists($filename)) {
               die(
"NO FILE HERE");
           }

           
header("Pragma: public");
           
header("Expires: 0");
           
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
           
header("Cache-Control: private",false);
           
header("Content-Type: $ctype");
           
header("Content-Disposition: attachment; filename=\"".basename($filename)."\";");
           
header("Content-Transfer-Encoding: binary");
           
header("Content-Length: ".@filesize($filename));
           
set_time_limit(0);
           @
readfile("$filename") or die("File not found.") 
save that in a php file. Alter the $filename bit for your file, and then do window.location="http://www.site.com/yournewphpfile.php"
punky is offline   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. The time now is 21:20.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum