Non spieghi bene cosa tu stia facendo ma secondo me il problema non è nello User-Agent.