"If path is not a valid directory or the directory can not be opened due to permission restrictions or filesystem errors, opendir() returns FALSE and generates a PHP error of level E_WARNING. You can suppress the error output of opendir() by prepending '@' to the front of the function name."
So, because your $url is missing file:// or ftp:// you get the error. Either that, or a permissions issue. As stated in your previous post on glob, you will need to find another way to do this.