note 103723 added to function.ftp-rawlist
| From: | postmaster at alishomepage dot com | Date: | Fri, 29 Apr 2011 18:13:28 +0000 |
| Subject: | note 103723 added to function.ftp-rawlist | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179286@lists.php.net to get a copy of this message | ||
One thing about the UNIX/Windows difference is that Windows will always start by listing the date,
which is a number.
You can simply use that fact for parsing:
// Function to parse ftp_rawlist (UNIX and Windows)
$list=ftp_rawlist($conn_id,"");
for($i=0;$i<sizeof($list);$i++){
if($list[$i][0]>='0' && $list[$i][0]<='9'){
// Windows first gives the date
...
}else{
// UNIX
...
}
}
----
Server IP: 69.147.83.197
Probable Submitter: 92.106.85.20
----
Manual Page -- http://www.php.net/manual/en/function.ftp-rawlist.php
Edit -- https://master.php.net/note/edit/103723
Del: integrated -- https://master.php.net/note/delete/103723/integrated
Del: useless -- https://master.php.net/note/delete/103723/useless
Del: bad code -- https://master.php.net/note/delete/103723/bad+code
Del: spam -- https://master.php.net/note/delete/103723/spam
Del: non-english -- https://master.php.net/note/delete/103723/non-english
Del: in docs -- https://master.php.net/note/delete/103723/in+docs
Del: other reasons-- https://master.php.net/note/delete/103723
Reject -- https://master.php.net/note/reject/103723
Search -- https://master.php.net/manage/user-notes.php