Fakher, the $filename, or the download id should be an argument to the download action, then from the download action you can use the Media view and store the download counter in the database or anywhere you want to track the downloads count.
regards __________ Muhaimen Ezabbad On Jan 16, 2012, at 12:26 PM, ahmed fakher wrote: > i see this doc page and i think it can help me to count downloads but > i don't understand how to count with this media views > http://book.cakephp.org/1.3/en/view/1094/Media-Views > > > this code for extract files dir and title...the user download when > clicked the file link..i need to count number of downloads..how to do > this with Media-Views or any method ? > > downloads_controller.php > > function index() { > $this->set('downloads', $this->paginate()); > } > > downloads/index.ctp > > <?php > $title = $download['Download']['title']; > // output filetitle > $filename = '/files/'.$download['Download']['filename']; > // output http://localhost/tet/files/un5titled0.rar > echo $this->Html->link($title, $filename,array('escape' => false)); > > ?> > > thanks for helping > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php __________________________ Muhaimen Ezabbad +218 91 393 0082 mezab...@gmail.com -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php