View Full Version : downloading to client side
aniltc
12-01-2006, 05:30 AM
hi all
How can we know whether a file finished downloading or not in the client side using php.
djr33
12-01-2006, 05:53 AM
PHP is a serverside language... you can't tell what's going on with the user.
Serverside you could check when the file is done being served, but that isn't a guarantee it got there.
Using a Java applet you could check this, as well as with ActiveX, and they could run AJAX to the php if need be.
What's the situation?
aniltc
12-01-2006, 06:27 AM
I want to download a file from the server,while downloading a file from the server,if i am again going to click on the same download link,the download must not happen and I want to show the message as u are downloading the file so please wait to finish for downloading this file.How can I eanble this technique?
Please give me a suggestion:mad: :mad:
djr33
12-01-2006, 06:53 AM
That's illogical.
If the download automatically crashes, it will never be "complete" and they will end up just not getting the file, ever.
Instead, what you need is some complex server side scripting that only allows the transfer of a single file once at one time, so that you cannot download a large file twice at the same time.
No idea here.
aniltc
12-01-2006, 07:33 AM
please try the below link
http://rapidshare.com/files/1921716/1580531598.rar
first time it will download the file.if u are trying again and agin you will get the message as
Your IP is downloading a file so please wait
How can i achieve this
thetestingsite
12-01-2006, 08:31 PM
You could use IP tracking. Simply take the user's IP address by using $_SERVER["REMOTE_ADDR"]; and log that into either a text file or database. Then do what djr33 suggested about using AJAX to let you know when the download is complete. As far as doing that, not a clue. But to get the info about if the user is downloading a file and tries to download again, use $_SERVER["REMOTE_ADDR"]. Hope this kinda points you in the right direction.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.