add url checking function on server side