From: Floyd Resler on 25 Feb 2010 09:59 One of my users has asked if I can display comments with a file list on their site. So I thought I might be able to use the comments from the properties of the file. Is there any way I can access this from PHP? The files are actually stored on a Linux box. Thanks! Floyd
From: Bastien Koert on 25 Feb 2010 10:12 On Thu, Feb 25, 2010 at 9:59 AM, Floyd Resler <fresler(a)adex-intl.com> wrote: > One of my users has asked if I can display comments with a file list on their site. So I thought I might be able to use the comments from the properties of the file. Is there any way I can access this from PHP? The files are actually stored on a Linux box. > > Thanks! > Floyd > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > If you have access to read the files and the comments are clearly delineated, then its shouldn't be hard to open each file and then pull out the contents with regex or str parsing. You might want to store the data somehow, so that in the future you only have to read in the changed files. -- Bastien Cat, the other other white meat
From: Richard Quadling on 25 Feb 2010 10:16 On 25 February 2010 14:59, Floyd Resler <fresler(a)adex-intl.com> wrote: > One of my users has asked if I can display comments with a file list on their site. Â So I thought I might be able to use the comments from the properties of the file. Â Is there any way I can access this from PHP? Â The files are actually stored on a Linux box. > > Thanks! > Floyd > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > The comments on a windows file (on the NTFS file system) are held in Alternative Datastreams (http://en.wikipedia.org/wiki/Fork_(filesystem)). As far as I know PHP cannot natively access them, though externals tools exist ... "LADS - Freeware version 4.10 (C) Copyright 1998-2007 Frank Heyne Software (http://www.heysoft.de) This program lists files with alternate data streams (ADS) Use LADS on your own risk!" Or are you talking about a file whose content is a list of comments? -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling
From: Richard Quadling on 25 Feb 2010 10:34 On 25 February 2010 15:16, Richard Quadling <rquadling(a)googlemail.com> wrote: > On 25 February 2010 14:59, Floyd Resler <fresler(a)adex-intl.com> wrote: >> One of my users has asked if I can display comments with a file list on their site.  So I thought I might be able to use the comments from the properties of the file.  Is there any way I can access this from PHP?  The files are actually stored on a Linux box. >> >> Thanks! >> Floyd Using LADS on a file I just added a title and summary to ... LADS - Freeware version 4.10 (C) Copyright 1998-2007 Frank Heyne Software (http://www.heysoft.de) This program lists files with alternate data streams (ADS) Use LADS on your own risk! Scanning directory D:\Personal Files\Downloads\Software\Programming\PHP\Browscap\ size ADS in file ---------- --------------------------------- 88 D:\Personal Files\Downloads\Software\Programming\PHP\Browscap\php_browscap.ini:â£DocumentSummaryInformation 204 D:\Personal Files\Downloads\Software\Programming\PHP\Browscap\php_browscap.ini:â£SummaryInformation 0 D:\Personal Files\Downloads\Software\Programming\PHP\Browscap\php_browscap.ini:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d} 292 bytes in 3 ADS listed The funny looking symbol can is character #5 which can be entered as ^E. So, ... more < php_browscap.ini:^ESummaryInformation > lad.log The file lad.log now contains the content of the SummaryInformation alternative data stream. The format of the content of the streams I don't know, sorry. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling
From: Ashley Sheridan on 25 Feb 2010 11:52 On Thu, 2010-02-25 at 15:34 +0000, Richard Quadling wrote: > On 25 February 2010 15:16, Richard Quadling <rquadling(a)googlemail.com> wrote: > > On 25 February 2010 14:59, Floyd Resler <fresler(a)adex-intl.com> wrote: > >> One of my users has asked if I can display comments with a file list on their site. So I thought I might be able to use the comments from the properties of the file. Is there any way I can access this from PHP? The files are actually stored on a Linux box. > >> > >> Thanks! > >> Floyd > > Using LADS on a file I just added a title and summary to ... > > LADS - Freeware version 4.10 > (C) Copyright 1998-2007 Frank Heyne Software (http://www.heysoft.de) > This program lists files with alternate data streams (ADS) > Use LADS on your own risk! > > Scanning directory D:\Personal > Files\Downloads\Software\Programming\PHP\Browscap\ > > size ADS in file > ---------- --------------------------------- > 88 D:\Personal > Files\Downloads\Software\Programming\PHP\Browscap\php_browscap.ini:â£DocumentSummaryInformation > 204 D:\Personal > Files\Downloads\Software\Programming\PHP\Browscap\php_browscap.ini:â£SummaryInformation > 0 D:\Personal > Files\Downloads\Software\Programming\PHP\Browscap\php_browscap.ini:{4c8cc155-6c1e-11d1-8e41-00c04fb9386d} > > 292 bytes in 3 ADS listed > > > The funny looking symbol can is character #5 which can be entered as > ^E. So, ... > > more < php_browscap.ini:^ESummaryInformation > lad.log > > The file lad.log now contains the content of the SummaryInformation > alternative data stream. > > The format of the content of the streams I don't know, sorry. > > > -- > ----- > Richard Quadling > "Standing on the shoulders of some very clever giants!" > EE : http://www.experts-exchange.com/M_248814.html > EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp > Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 > ZOPA : http://uk.zopa.com/member/RQuadling > If the files exist on a Linux server, then you're out of luck, because as Richard said, this information is kept in the alternate data streams, which is part of the NTFS filesystem (and I don't know anyone crazy enough to install Linux onto an NTFS formatted partition!) What you could do is store the filenames in a database, and use a second table for the comments, attributing them to a file. This would lend itself well for web-based use, but will cause problems if you move the files (as the database would lose track of them) Some file formats are built to allow extra data though. For example, images have EXIF data, for which there are ways to read (and write afaik) within PHP. Most audio formats have this, and I would assume video formats too. You'll probably find most file formats have something available for this, but the deployment will vary from file type to file type. Thanks, Ash http://www.ashleysheridan.co.uk
|
Next
|
Last
Pages: 1 2 Prev: HipHop and other PHP compiler performance evaluation Next: Magento & SOAP2 |