Warung Bebas

Selasa, 03 Mei 2011

Cara Mengganti User Agent Pada Control WebBrowser VB6


Seperti yang kita ketahui bahwa untuk membuat browser sendiri di Visual Basic 6 kita memerlukan control WebBrowser bawaan dari Internet Explorer. Control ini adalah control satu - satunya yang diperlukan dalam pembuatan project browser. Sebenarnya masih ada lagi control WebBrowser plugin bawaan Mozilla, tapi agak susah dalam codingnya.

Script utama dalam berselancar ke web tujuan dengan menggunakan control WebBrowser adalah sebagai berikut :

WebBrowser1.Navigate "http://situs tujuan"

Fungsi diatas akan mengirimkan parameter default user agent bawaan Internet Explorer sobat. Nah, bagaimanakah caranya untuk mengganti User Agent ke User Agent setingan kita sendiri. Caranya sangat mudah, lihat coding berikut ini :

WebBrowser1.Navigate "http://situs tujuan", , , , "User-Agent:Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413"

Script diatas adalah untuk menuju ke situs tujuan dengan mengirimkan parameter sebagai Handphone Nokia. Untuk User Agent yang lain silakan masukkan parameter sesuai dengan keinginan.

Tips :

Untuk mempermudah coding dan mudah untu bergonta - ganti User Agent, atur coding agar simple dengan mendeklarasikan sebuah nilai.

Contoh :

Private Sub CMDGO_Click()
Dim URL As Long, AGEN As Long
URL = CBOURL.Text
AGEN = CBOAGEN.Text

WebBrowser1.Navigate URL, , , , AGEN
End Sub

Berikut daftar User Agent yang bisa sobat masukkan dalam control combobox CBOURL

User Agen
Agen
User-Agent:Avant Browser/1.2.789rel1 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.0 Safari/532.5
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.0 Safari/532.5
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.310.0 Safari/532.9
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; en-US; rv:1.9pre) Gecko/2008072421 Minefield/3.0.2pre
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100815 Minefield/4.0b4pre
User-Agent:Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0 )
User-Agent:Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)
User-Agent:Mozilla/5.0 (Windows; U; Windows XP) Gecko MultiZilla/1.6.1.0a
User-Agent:Mozilla/4.8 [en] (Windows NT 5.1; U)
User-Agent:Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Mobile/7C145
User-Agent:Opera/7.50 (Windows XP; U)
User-Agent:Mozilla/4.0 (compatible; MSIE 5.0; Series80/2.0 Nokia9500/4.51 Profile/MIDP-2.0 Configuration/CLDC-1.1)
User-Agent:Opera/7.51 (Windows NT 5.1; U) [en]
User-Agent:Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2b) Gecko/20021001 Phoenix/0.2
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.6 (Change: )
User-Agent:Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413
User-Agent:Mozilla/5.0 (SymbianOS/9.2; U; Series60/3.1 NokiaN95/10.0.018; Profile/MIDP-2.0 Configuration/CLDC-1.1) AppleWebKit/413 (KHTML, like Gecko) Safari/413 UP.Link/6.3.0.0.0
User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser; Avant Browser; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.14 (KHTML, like Gecko) Chrome/9.0.601.0 Safari/534.14
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.14 (KHTML, like Gecko) Chrome/10.0.601.0 Safari/534.14
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0E)
User-Agent:Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User-Agent:Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
User-Agent:Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
User-Agent:Opera/9.25 (Windows NT 6.0; U; en)
User-Agent:Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.7.39 Version/11.00
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/532.8 (KHTML, like Gecko) Chrome/4.0.302.2 Safari/532.8
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.464.0 Safari/534.3
User-Agent:Mozilla/5.0 (Macintosh; U; Mac OS X Mach-O; en-US; rv:2.0a) Gecko/20040614 Firefox/3.0.0+
User-Agent:Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.15
User-Agent:Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/85.8
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Camino/2.2.1
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.15 Safari/534.13
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User-Agent:Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US) AppleWebKit/528.16 (KHTML, like Gecko, Safari/528.16) OmniWeb/v622.8.0.112941
User-Agent:Opera/9.64 (Macintosh; PPC Mac OS X; U; en) Presto/2.1.1
User-Agent:Mozilla/5.0 (X11; U; Linux i686; en-us) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) lt-GtkLauncher
User-Agent:Mozilla/5.0 (Unknown; U; UNIX BSD/SYSV system; C -) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.10.2
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User-Agent:Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.310.0 Safari/532.9
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User-Agent:Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
User-Agent:Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.7.39 Version/11.00

Nah sekarang silakan coba dan selamat berkarya

2 komentar em “Cara Mengganti User Agent Pada Control WebBrowser VB6”

  • 17 Maret 2017 pukul 21.08
    Unknown Disse:

    informasinya sangat keren gan, bagus dan mantap.
    Download Game

    delete
  • 30 Maret 2022 pukul 06.20
    Anonim Disse:

    Cara Mengganti User Agent Pada Control Webbrowser Vb6 - Tips Dan Trick Medapatkan Dollar Dari Internet >>>>> Download Now

    >>>>> Download Full

    Cara Mengganti User Agent Pada Control Webbrowser Vb6 - Tips Dan Trick Medapatkan Dollar Dari Internet >>>>> Download LINK

    >>>>> Download Now

    Cara Mengganti User Agent Pada Control Webbrowser Vb6 - Tips Dan Trick Medapatkan Dollar Dari Internet >>>>> Download Full

    >>>>> Download LINK

    delete

Posting Komentar