Jump to content

how do download image??


yolop

Recommended Posts

Your question is very unclear. Are you asking how your clients would download a file from your server? Simply provide them a link. eg; http://foo.com/image.jpg

no

for ex.

i want to creat a PHP PAGE

that download this image

http://www.phpfreaks.com/forums/Themes/default/images/h_powered-php.gif

when the clients come into this page he will download the image

Link to comment
Share on other sites

Your question is very unclear. Are you asking how your clients would download a file from your server? Simply provide them a link. eg; http://foo.com/image.jpg

no

for ex.

i want to creat a PHP PAGE

that download this image

http://www.phpfreaks.com/forums/Themes/default/images/h_powered-php.gif

when the clients come into this page he will download the image

 

I think what you're trying to do is display the image to the user right? In that case, just put it in <img> tags. Basic html knowledge is necessary in order to code php...

Link to comment
Share on other sites

Tell us

 

Are you trying to set it up for a clickable download or a forced download. 

 

Do you want the file to automatically dl when the person enter the page?

yhe

i want that image

http://www.phpfreaks.com/forums/Themes/default/images/h_powered-php.gif

download automatically when the user enter the page

 

 

Your question is very unclear. Are you asking how your clients would download a file from your server? Simply provide them a link. eg; http://foo.com/image.jpg

no

for ex.

i want to creat a PHP PAGE

that download this image

http://www.phpfreaks.com/forums/Themes/default/images/h_powered-php.gif

when the clients come into this page he will download the image

 

I think what you're trying to do is display the image to the user right? In that case, just put it in <img> tags. Basic html knowledge is necessary in order to code php...

no no no i don't trying to do is display the image

i want to let the user download the image

Link to comment
Share on other sites

In that case you're looking for a force download script which will be pretty much impossible of your server doesn't support readfile as you said earlier.

 

Why? Can't he use echo file_get_contents( 'filename',  ); or fopen/fread/echo?

 

no

if i write

<?php

echo file_get_contents( '1.gif');

?>

 

it's only give me some understood code

i want to download....

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.