I've known him slightly on and off for some years, and this morning I ran across him in the street.
I bumped into him in the street.
I've known him for some years, but haven't seen him for a few months.