Yes you can, it´s in the book, and you add sneak attack dice each time you hit when he is considered flat-footed...
About the flanking... by the rules it´s a melee thing...
I think that flanking was not implemented for ranged weapons, since it really doesn´t work like melee...
But you can do...