electric Posted October 26, 2007 at 02:39 PM Report Share #143028 Posted October 26, 2007 at 02:39 PM Boas estou a faer 1 pogaminha que metes o link num tbx, carregas no btn e ele envia o resultado para um webbrowser, mas queria saber como faço para defenir 1 useragent no vb.net :s Link to comment Share on other sites More sharing options...
Revolt Posted October 26, 2007 at 04:21 PM Report Share #143050 Posted October 26, 2007 at 04:21 PM se estiveres a usar HttpWebRequests é só atribuir um valor à propriedade UserAgent. Se estiveres a usar o controlo webbrowser podes tentar este método: http://msdn2.microsoft.com/en-us/library/ms161355.aspx adicionando o header de 'User-Agent:qualquercoisa' Revolt Website Antigo Nick: Pauzinhos Link to comment Share on other sites More sharing options...
electric Posted October 26, 2007 at 04:59 PM Author Report Share #143057 Posted October 26, 2007 at 04:59 PM boas tou a usar 1 webbrowser :s so k nunca usei nem sei como usar headers nem useragent em vb :s não podes dar + 1 dica ? 😄 tanks Link to comment Share on other sites More sharing options...
Revolt Posted October 27, 2007 at 11:07 AM Report Share #143232 Posted October 27, 2007 at 11:07 AM Para abrires um determinado site com user-agent: webBrowser.Navigate("url", Nothing, Nothing, "User-Agent: electric") não testei mas deve ser mais ou menos assim Revolt Website Antigo Nick: Pauzinhos Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now