473,473 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to avoid save option during download in php

mageswar005
72 New Member
Hello Guys,
I want to Avoid the Save option when i click the download link in php .
I just want open and cancel option only, i dont want save option when i click the download link in php.How to avoid the save option bec for file security reason.

Detail Description:
Language i used : PHP
Db i used : Mysql

First i upload the file in my application, then i give one link(click here to open) in php, that link is mapped the uploaded files, Now the user click that link means they can able to download the files now, but we need to avoid the download option,we need only open and cancel option.

Current Scenario: when the user click the link means,it shows [open,save,cancel] .

Expect Scenario: when the user click the link means, we need to show [open,cancel] only.

Please some one help me , now i am struggling in this part.

Regards,
M.Mageswaran
Jan 5 '09 #1
6 2476
Dormilich
8,658 Recognized Expert Moderator Expert
@mageswar005
since PHP is a server side language, you can't click a link in PHP (strictly speaking. you can click a link in HTML though). thus, there must be somewhere a function that builds that link. try changing this function.

regards
Jan 5 '09 #2
Atli
5,058 Recognized Expert Expert
Hi.

This is something that you can not, and should not be able to, control.
From the server's perspective, opening and downloading the file is the exact same thing. In both cases the server just sends the data to the browser.

How the browser handles file downloads is up the the browser, and more importantly, the user of that browser.
Whether the browser fakes an "Open" or just does a straight out "Save" is up to the user.

From a security standpoint, the Save and Open options are one and the same.
Both result in your data being downloaded to the client's computer.
The Open option is simply a shortcut, so the user doesn't have to manually open the file after it is downloaded.
Jan 5 '09 #3
Markus
6,050 Recognized Expert Expert
You'll have to get building your own internet browser ;)

Markus.
Jan 6 '09 #4
mageswar005
72 New Member
Give me some idea about this
Jan 12 '09 #5
Markus
6,050 Recognized Expert Expert
@mageswar005
There's only one idea to give: it can't be done using PHP. You may, however, be able to do something like this with Flash. But, then again, I don't know much about it.
Jan 12 '09 #6
Atli
5,058 Recognized Expert Expert
@mageswar005
I suggest you read the earlier responses again.
They pretty much say it all.
Jan 12 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Chris Lobdell | last post by:
Hey, everyone. For the past two years, we have offered files for download through a secure website. Users, after clicking on a link, are redirected to a PHP page that passes the appropriate...
8
by: dave | last post by:
Hi there I'm trying to force save as dialogue using this code in download.asp..but when it runs it prompts for download.asp to save or open. code snippet (from aspfaq.com) ...
3
by: 00steve | last post by:
Hi, I was wondering if anyone knew how to go about having a "save as HTML" option incorporated within a page. (I know the option is available from the file menu from within IE, but a client has...
3
by: | last post by:
I have an interactive mapping website where there is a main map image. For the map image, I over-rode the default right click menu to provide a popup menu for mapping tools. Now my client has asked...
4
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. ...
8
by: kieran | last post by:
Hi, I want to download an image from the web and save it locally. I have spent all day messing about with this and am still no where. We have a firewall so i use the below code. I know it...
5
by: hp_1981 | last post by:
Hi Is there anyway avoiding users to save my web pages? this idea came to my mind when I tried to save a web page, but in the middle of saving progress something like the following error...
3
by: =?Utf-8?B?YXNkZg==?= | last post by:
Hello. I am making a web application with c# and am using this code: Response.ContentType = "application/x-excel"; Response.AddHeader("Content-Disposition", "attachment;filename=" +...
1
by: rn5a | last post by:
When users submit a Form with a SQL query, the resultset is retrieved from a MS-Access database table which is then exported to an MS-Excel worksheet. After the records get exported to MS-Excel, I...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.