I need to download something from server to local machine just by a visiting an url without any popup-window,using something like php or python.But cannot find a good solution.Is it possible or not?Hope someone can help me.
views:
229answers:
4As the question is stated, I must interpret it as asking for instructions to implement drive-by downloads. See also the previous question http://stackoverflow.com/questions/2226177/how-to-download-files-to-a-default-dir-without-poping-an-option-window-in-flex
Please correct me if I'm wrong.
No. It would be a violation of the user's privacy to download files to their machine without giving them a clear choice. You can't do this in a regular (default settings) web browser, not even with Java or Flash.
Do you want to provide a link on your website and when a user clicks on it you want to start the download of something immediately?
If that is what you want all you have to do is to set the appropriate http header. Let's say you want to provide an xml file for download:
header('Content-type: application/xml');
header('Content-Disposition: attachment; filename="downloaded.xml"');
//now output something:
readfile('the_file.xml'); // or you generate the document dynamically - it doesn't matter
(Please try to be a little more specific in your questions)
I guess you could use an ActiveX control in Internet Explorer, but you still would need security rights to get that done.