View Full Version : NEED glob function for remote files
rocky10
10-04-2006, 09:01 PM
I am not a very experienced user. What I want to do is I have a portion of a file name (s12345_101_*.jpg) and I am trying to get the actual file name so I can view the file. So, I would normally us $temp = glob($name); and it would return the actual file name to me (s1234_101_22.jpg). So, my problem is the files are now on a remote server. I have access to the directory, I just do not know how to write a glob equivalent function for remote directory use.
Any ideas????? Thanks in advance!!:confused:
Fumigator
10-04-2006, 09:19 PM
glob() won't work on remote files, and thank goodness for that, considering the security risks associated with that prospect.
rocky10
10-04-2006, 09:26 PM
glob() won't work on remote files, and thank goodness for that, considering the security risks associated with that prospect.
I under stand this.... I would like to write a glob like function which would allow me perform these function on the remote directories which I have access to. Thanks!
Mwnciau
10-04-2006, 11:51 PM
You can use the FTP nlist (http://uk.php.net/manual/en/function.ftp-nlist.php) command and use regex to check the results.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.