Replaced deprecated php fuctions strip() and ereg().