note 36700 deleted from function.ftp-rawlist by crell

From: Date: Thu, 31 Mar 2022 19:31:28 +0000
Subject: note 36700 deleted from function.ftp-rawlist by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-217911@lists.php.net to get a copy of this message
Note Submitter: postmaster at alishomepage dot com ---- Another "formula" for decoding the rawlist: the ide is that normaly a "ls" contains info like below: <file rights> <number> <owner> <group> <date> <time> <filename> and: the "time" contains a ":" (which is NOT contained in any of the other infos -if we reversely read the array) and, in the case the "time" would not exist, i have done a "protection script" that would try to find out using the year... Yet that may NOT always work since a user name or group name MAY contain an item like "1999" etc... (and i did not check the date format reversely -on the filename first- since a probability of presence is higher of a date is MUCH higher in a filename) So here we go: <? [... code ...] $fnTest=array("198","199","200","201","202"); [... code ...] $j=0; $strrpos=strrpos($list[$i],":"); while($strrpos==0){ $strrpos=strpos($list[$i],$fnTest[$j]); $j++;} if($j){ $strrpos+=2+strlen($fnTest[$j]); }else{ $strrpos+=4;} $elmt=substr($list[$i],$strrpos); [... code ...] ?> and $elmt would *normally* contain the info we want... but i'm still working on it!

« previous php.notes (#217911) next »