Used url parse to get extension