php download a file without redirecting

Reply

Join Date: Sep 2004
Posts: 9
Reputation: bennetjosem is an unknown quantity at this point 
Solved Threads: 0
bennetjosem bennetjosem is offline Offline
Newbie Poster

php download a file without redirecting

 
0
  #1
Jul 5th, 2005
i got a page index.php. i got a link over there to download.php.

in download.php i'll do some mysql things. (like count file download...) and redirect the browser to some file 123.zip.

Wot i really want is. I dont want to go to download.php instead the browser should remain in index.php while i store all data in db.
my link will be site.com/download.php?fileid=xx

and user should get the file in hand without goin to download.php. (i eman he should not go to some blank page (download.php))

i think i am clear.

please help
Reply With Quote Quick reply to this message  
Join Date: Jan 2005
Posts: 294
Reputation: zippee is an unknown quantity at this point 
Solved Threads: 6
zippee's Avatar
zippee zippee is offline Offline
Posting Whiz in Training

Re: php download a file without redirecting

 
0
  #2
Jul 5th, 2005
You may use 'include' or 'require' to attach the download.php within your index file. The link to download file will be something like index.php?action=download&id=1234. When someone click the link, the index page will reload and by using isset($_GET['action']), the page will call the download program and the user still in the index page.

I hope this help.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 9
Reputation: bennetjosem is an unknown quantity at this point 
Solved Threads: 0
bennetjosem bennetjosem is offline Offline
Newbie Poster

Re: php download a file without redirecting

 
0
  #3
Jul 5th, 2005
well thnks for the reply. but still i don want to reply. have a look at themexp.org there try download links i want it to be like that! thnx
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 10
Reputation: val542 is an unknown quantity at this point 
Solved Threads: 0
val542 val542 is offline Offline
Newbie Poster

Re: php download a file without redirecting

 
0
  #4
Jul 5th, 2005
Hello bennetjosem
is it a joke??
when i click on download it's an exe file i get!!! :rolleyes:
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 9
Reputation: bennetjosem is an unknown quantity at this point 
Solved Threads: 0
bennetjosem bennetjosem is offline Offline
Newbie Poster

Re: php download a file without redirecting

 
0
  #5
Jul 5th, 2005
well never mind that. just think hows that working??
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum


Views: 12411 | Replies: 4
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC