Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 14th, 2011, 09:45 AM
whistller whistller is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2011
Posts: 6 whistller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 31 m 34 sec
Reputation Power: 0
4 days & no success with proxy login

Hello, once again

I have a very BIG problem. I made program that connect to proxy server and browse via proxy server. However, my company has a made private proxy server which I must authenticate through to get to the internet.

I read hundreds pages of docs, but without success. My program code look like so:
Code:
    module:
    Public Declare Sub UrlMkSetSessionOption Lib "urlmon.dll" _
    (ByVal dwOption As Long, ByRef pBuffer As Any, _
    ByVal dwBufferLength As Long, ByVal dwReserved As Long)
     
    Public Type INTERNET_PROXY_INFO
    dwAccessType As Long
    lpszProxy As String
    lpszProxyBypass As String
    End Type
    Public Const INTERNET_OPEN_TYPE_PROXY = 3
    Public Const INTERNET_OPTION_PROXY = 38
     
    Public Declare Function InternetSetOption Lib "wininet.dll" Alias "InternetSetOptionA" _
    (ByVal hInternet As Long, ByVal lOption As Long, ByRef sBuffer As Any, ByVal lBufferLength As Long) As Integer
    Public Declare Function InternetSetOptionStr Lib "wininet.dll" Alias "InternetSetOptionA" _
    (ByVal hInternet As Long, ByVal lOption As Long, ByVal sBuffer As String, ByVal lBufferLength As Long) As Integer
     
     
    form:
    Private Sub Command6_Click()
    Dim ipi As INTERNET_PROXY_INFO
    dim username as string 
    dim password as string 

    ipi.dwAccessType = INTERNET_OPEN_TYPE_PROXY
    ipi.lpszProxy = "46.37.165.113:17890"
    ipi.lpszProxyBypass = ""
     
    username = "america01" 'proxy server ID and PASS real and WORKING
    password = "YpEEJy8u"  'proxy server ID and PASS real and WORKING
     
    call UrlMkSetSessionOption(INTERNET_OPTION_PROXY_USERNAME, username, sizeof(username), 0);
    call UrlMkSetSessionOption(INTERNET_OPTION_PROXY_PASSWORD, password, sizeof(password), 0);
    call UrlMkSetSessionOption(INTERNET_OPTION_PROXY, ipi, Len(ipi), 0) 
    Form1.WebBrowser1.Navigate "http://whatismyipaddress.com/"


What wrong I`m doing ?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > 4 days & no success with proxy login

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap