Need a new web host or having a problem with a script? Tips and advice on the best way to design, build and maintain your most valuable asset - your website!

how to put download link on my pic?

dvmav_aa
Posts: 46
Joined: 07 Jun 11
Trust:

how to put download link on my pic?

i want the download link on my picture. When s.o click on the word "Download here" and it is the download link of my image

.so i want to put direct link on the word instead of just right click on the pic and select "save picture as". So can we put

link code on the word "download here"?
  • 0
cecille.l
Posts: 6369
Joined: 25 Feb 11
Trust:
Hi,

eHow has a step-by-step guide on how to make an image clickable

Hope that helps. Have a good day!
  • 0
Cecille

Building affiliate marketing websites is a breeze: https://www.affilorama.com/affilojetpack
Like us on Facebook: https://www.facebook.com/affilorama
 
thel.online.ph
Posts: 102
Joined: 13 Sep 11
Trust:
Hi,

Use the PHP header() function.
First, create a file named download_img.php and paste the following code:

PHP Code:

<?php
header('Content-type: image/png');
header('Content-Disposition: attachment; filename="downloaded-name.png"');
readfile('original-image-name.png');
?>

then, link to this file:
HTML Code:

<a href="download_img.php">Download this Image</a>

Clicking the link will open the download dialog box in the browser :-)
  • 0
marketing5
Posts: 6
Joined: 16 Sep 11
Trust:
Use the PHP header() function and HTML code u can link code on your desire location.
  • 0

This topic was started on Jun 20, 2011 and has been closed due to inactivity. If you want to discuss this topic further, please create a new forum topic.

cron