removed strstr for pre php 5.3 support