That's a good start, but two things: it matches any occurance of $keyword, even if it is part of a word. If this isn't an issue, than you're good.
However, one bigger problem is if $keyword is before the 60th character in $string, then it'll cut out the end of the string, not the part you want. One workaround is to change:
$cut = substr($string, $pos-60,120);
to:
if ($pos>60) {
$cut = substr($string, $pos-60,120);
} else {
$cut = substr($string, 0, 90);
}
This should work fine now.