BBEdit documents have AppleScript properties "FTP info" and "is FTP".
"is FTP" is a boolean indicating "was this document opened from (or saved to) an FTP server?" (Description from Script Debugger's BBEdit Dictionary listing.)
"FTP info" is a record with "information about a file residing on an FTP server". Script Debugger's BBEdit Dictionary listing of properties for "FTP info" is:
Property : Access : Type : Description
binary transfer
: get : boolean
: was the file transferred as raw binary?
file : get : file : the disk file in which this file is stored locally
host : get : text : name of the FTP server
passive : transfer : get : boolean : was the file transferred using passive FTP
password : get : text : login password for the server
path : get : text : path to the file on the server
port : get : integer : TCP connection port to the server
secure : transfer: get : boolean : was the file transferred securely?
user : get : text: login ID for the server
From what I can gather from internet searching and AI querying, you can use those properties in an AppleScript to get/construct your desired information.