Not having a clue of the exact nature of how firebird does this, here's what you should be able to do:
Get the sql file on the machine, either by uploading through a php script or using ftp.
Then, read in the file, one line at a time, and feed it to the database through the firebird_query (or whatever it's called) command. In postgresql this will work. I don't know about firebird.
Basic scrupt would be like:
// open files and all that jazz
// open connection to db
while (!feof($fp)){
$line = fgets($fp,100000);
$res = ib_query($line);
}