Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2007, 02:04 AM
Authorized User
 
Join Date: Oct 2006
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to snowbydave1
Default How to provide download link for images

Dear Friend,


I want to give download link to few images, please check below example.

1.jpg
2.jpg
3.jpg

When user click on any above file it will display Open or Run, Save, cancel box as it will happen for other site.

So end user will save file in appropriate folder. Please guide me or give me source code.


Thanking you,


Snowby Dave

 
Old March 22nd, 2007, 07:01 AM
Authorized User
 
Join Date: Mar 2007
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

the window for open run save and canel happens on the client's side.

i suppose that maybe you can tinker with the content types to trick the browser
we use the header function for this in PHP http://www.php.net/manual/en/function.header.php

 
Old March 23rd, 2007, 08:32 AM
Authorized User
 
Join Date: Oct 2006
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to snowbydave1
Default

Dear Friend,


Your are 100% right. But this will not allow me to keep file name between any HTML tag. I think you will also face problem if you used HTML tag. To work with header() you have to simply used plain PHP and there is no echo or any startment after header().

Am I right ? If you have any solution then will you please send me ?

Thanks in advance.


Snowby Dave

 
Old March 23rd, 2007, 08:40 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

The Save dialog box is spawned by IE (or firefox) when it detects a binary stream being pushed down from the webserver.

Simply put, you can not alter that dialog from PHP not can you stop a user from changing the name of the image file.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 24th, 2007, 04:38 AM
Authorized User
 
Join Date: Oct 2006
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to snowbydave1
Default

Ok let me checkout that site. Once again kindly thanks for your response. Suppose if I didn't get perfect solution from your suggest site then again I will asked you.

Please bear with me.


Thanking you,


Snowby Dave






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to provide download link for images snowbydave1 PHP How-To 2 March 27th, 2007 12:11 AM
How to provide download link for images snowbydave1 Pro PHP 0 March 19th, 2007 02:06 AM
How to provide download link for images snowbydave1 PHP Databases 0 March 19th, 2007 02:04 AM
How to provide download link for images snowbydave1 PHP FAQs 0 March 19th, 2007 02:03 AM
link to download a file kalyansarkar108 Javascript How-To 1 November 28th, 2005 09:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.