sgrep can be found at http://www.cs.helsinki.fi/u/jjaakkol/sgrep.html as a binary for several platforms or as source code.
Place the executable program at a place where it can be found by your web server e.g. /usr/bin or /usr/local/bin. If you place it in a non common directory make sure to adjust your $PATH variable.