Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: [VB6] Ripper Wrapper Issue

Hybrid View

  1. #1

    Integra's Avatar
    Joined
    Nov 2013
    Posts
    213
    Userbars
    3
    Thanks
    53
    Thanked
    45/32
    DL/UL
    25/0
    Mentioned
    12 times
    Time Online
    4d 18h 34m
    Avg. Time Online
    1m

    [VB6] Ripper Wrapper Issue

    Just wondering if anyone has a copy of RipperWrapper? Mine doesn't seem to work and I know from reading that someone streamlined it earlier this year or late last year.

    The problem I have is that when I request it load a page and then run the GetStringBetween function it returns nothing, so I'm theorising its not loading a page.... help?

    Code:
    strHTML = w.Request("GET", "http://www.neopets.com/", "http://www.google.com")
    txt1.text = w.GetStringBetween(strHTML, "<html>", "</html>"

  2. #2
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,720
    Userbars
    166
    Thanks
    5,906
    Thanked
    33,076/6,608
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 4h 55m
    Avg. Time Online
    3h 13m
    This happens to me sometimes and it's a very strange issue I could not fix nor the actual creator of the wrapper. One temporary solution would be to restart your computer and try again... this usually fixes it.

    @(you need an account to see links)

    Maybe you can post the wrapper source code here and someone can try and find a solution? Me and Drew010 tried for a while to fix this and so did @(you need an account to see links) on his own but still there was no solution.
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  3. #3

    Integra's Avatar
    Joined
    Nov 2013
    Posts
    213
    Userbars
    3
    Thanks
    53
    Thanked
    45/32
    DL/UL
    25/0
    Mentioned
    12 times
    Time Online
    4d 18h 34m
    Avg. Time Online
    1m
    Its interesting you say that @Infamouse Joe sure can, I'm not sure if my version is dependent on zgate.dll or not. I don't believe it is, but given that I found it on my old external anything is possible. Especially since the version of Gluraks I'm using seems to have an issue as well. I'm wondering if its because I'm running Win 7 in a VM environment but I can't see that making a difference, I know it has a functional connection.

    RipperWrapper Code:
    Code:
    Option Explicit
    'API Declarations
    Private Declare Function ZGateInflate Lib "zgate.dll" (ByVal inp As String, ByVal inlen As Long, ByRef out As String) As Long
    Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long
    Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long
    Private Declare Function timeGetTime Lib "WINMM.DLL" () As Long
    Private Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As Currency) As Long
    Private Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As Currency) As Long
    'Default Property Values:
    Const m_def_LastPage As String = vbNullString
    Const m_def_Cookies  As String = vbNullString
    Const m_def_GZip As Boolean = True
    Const m_def_StopWrapper  As Boolean = False
    Const m_def_Browser  As String = "Firefox"
    Const m_def_Proxy  As String = Empty
    Const m_def_UseProxy As Boolean = False
    Const m_def_Timeout As Integer = 3000
    'Property Values
    Dim m_LastPage As String
    Dim m_Cookies As String
    Dim m_GZip As Boolean
    Dim m_StopWrapper As Boolean
    Dim m_Browser As String
    Dim m_Elapsed As String
    Dim m_Proxy As String
    Dim m_UseProxy As Boolean
    Dim m_Timeout As Long
    'Other Declarations
    Dim curStop As Currency, curStart As Currency, _
        curFrequency As Currency, _
        m_hMod As Long, strBuffer As String
    Private Type proxy
        intHost(1 To 4) As Integer
        intPort As Integer
    End Type
    Public Event ChangedHeaders(strHeaders As String)
    Public Event RequestComplete(ByVal strHTML As String, strMethod As String)
    'Property Subs
    Public Property Get LastElapsed() As Boolean
        LastElapsed = m_Elapsed
    End Property
    Public Property Get proxy() As String
        proxy = m_Proxy
    End Property
    Public Property Let proxy(ByVal New_Proxy As String)
        m_Proxy = New_Proxy
        PropertyChanged "Proxy"
    End Property
    Public Property Get Timeout() As String
        Timeout = m_Timeout
    End Property
    Public Property Let Timeout(ByVal New_Timeout As String)
        m_Timeout = New_Timeout
        PropertyChanged "Timeout"
    End Property
    Public Property Get UseProxy() As Boolean
        UseProxy = m_UseProxy
    End Property
    Public Property Let UseProxy(ByVal New_UseProxy As Boolean)
        m_UseProxy = New_UseProxy
        PropertyChanged "UseProxy"
    End Property
    Public Property Get GZip() As Boolean
        GZip = m_GZip
    End Property
    Public Property Let GZip(ByVal New_GZip As Boolean)
        m_GZip = New_GZip
        PropertyChanged "GZip"
    End Property
    Public Property Get LastPage() As String
        LastPage = m_LastPage
    End Property
    Public Property Let LastPage(ByVal New_LastPage As String)
        m_LastPage = New_LastPage
        PropertyChanged "LastPage"
    End Property
    Public Property Get Cookies() As String
        Cookies = m_Cookies
    End Property
    Public Property Let Cookies(ByVal New_Cookies As String)
        m_Cookies = New_Cookies
        PropertyChanged "Cookies"
    End Property
    Public Property Get Browser() As String
        Browser = m_Browser
    End Property
    Public Property Let Browser(ByVal New_Browser As String)
        If New_Browser <> "Firefox" And New_Browser <> "Internet Explorer" And New_Browser <> "Opera" Then
            New_Browser = "Firefox"
        End If
        m_Browser = New_Browser
        PropertyChanged "Browser"
    End Property
    Public Property Get StopWrapper() As Boolean
        StopWrapper = m_StopWrapper
    End Property
    Public Property Let StopWrapper(ByVal New_StopWrapper As Boolean)
        m_StopWrapper = New_StopWrapper
        PropertyChanged "StopWrapper"
    End Property
    Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
        m_Browser = PropBag.ReadProperty("Browser", m_def_Browser)
        m_LastPage = PropBag.ReadProperty("LastPage", m_def_LastPage)
        m_UseProxy = PropBag.ReadProperty("UseProxy", m_def_UseProxy)
        m_Proxy = PropBag.ReadProperty("Proxy", m_def_Proxy)
        m_GZip = PropBag.ReadProperty("GZip", m_def_GZip)
        m_StopWrapper = PropBag.ReadProperty("StopWrapper", m_def_StopWrapper)
        m_Timeout = PropBag.ReadProperty("Timeout", m_def_Timeout)
    End Sub
    Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
        Call PropBag.WriteProperty("LastPage", m_LastPage, m_def_LastPage)
        Call PropBag.WriteProperty("GZip", m_GZip, m_def_GZip)
        Call PropBag.WriteProperty("UseProxy", m_UseProxy, m_def_UseProxy)
        Call PropBag.WriteProperty("Proxy", m_Proxy, m_def_Proxy)
        Call PropBag.WriteProperty("StopWrapper", m_StopWrapper, m_def_StopWrapper)
        Call PropBag.WriteProperty("Browser", m_Browser, m_def_Browser)
        Call PropBag.WriteProperty("Timeout", m_Timeout, m_def_Timeout)
    End Sub
    Private Sub UserControl_InitProperties()
        m_LastPage = m_def_LastPage
        m_GZip = m_def_GZip
        m_StopWrapper = m_def_StopWrapper
        m_Browser = m_def_Browser
    End Sub
    'UserControl_ Subs
    Private Sub UserControl_Initialize()
        m_hMod = LoadLibrary("shell32.dll")
    End Sub
    Private Sub UserControl_Terminate()
        FreeLibrary (m_hMod)
    End Sub
    Private Sub UserControl_Resize()
        UserControl.Width = imgBack.Width
        UserControl.Height = imgBack.Height
    End Sub
    'Functions used by ctlRipperWrapper
    Private Function Count(strSubject As String, strCount As String) As Integer
        Dim intPos As Integer
        intPos = InStr(1, strSubject, strCount)
        Do While intPos <> 0
            If intPos = 0 Then
                Exit Function
            End If
            intPos = intPos + Len(strCount)
            Count = Count + 1
            intPos = InStr(intPos, strSubject, strCount)
        Loop
    End Function
    Private Function SplitProxy(strProxy As String, proxy As proxy) As Boolean
        Dim intTemp As Integer, strParts() As String, intForX As Integer
        intTemp = Count(strProxy, ".")
        If intTemp <> 3 Then
            SplitProxy = False
            Exit Function
        End If
        strParts = Split(strProxy, ".", 4)
        If InStr(1, strParts(3), ":") <> 0 Then
            For intForX = 0 To 3
                If Val(strParts(intForX)) > 255 Or Val(strParts(intForX)) < 1 Then
                    SplitProxy = False
                    Exit Function
                End If
            Next intForX
            If IsNumeric(Mid(strParts(3), InStr(1, strParts(3), ":") + 1)) = False Then
                SplitProxy = False
                Exit Function
            End If
            proxy.intPort = Val(Mid(strParts(3), InStr(1, strParts(3), ":") + 1))
            strParts(3) = Left(strParts(3), InStr(1, strParts(3), ":") - 1)
        Else
            SplitProxy = False
            Exit Function
        End If
        For intForX = 0 To 3
            proxy.intHost(intForX + 1) = Val(strParts(intForX))
        Next intForX
        SplitProxy = True
    End Function
    Private Function DecodeChunkedMessage(ByVal strBody As String) As String
        Dim lnSize As Long, lnStart As Long, _
            lnEnd As Long, strTemp As String
            
        lnStart = InStr(1, strBody, vbCrLf) - 1
        If lnStart < 0 Then
            DecodeChunkedMessage = strBody
            Exit Function
        End If
        lnSize = Hex2Dec(Mid$(strBody, 1, lnStart))
        lnStart = lnStart + 3
        Do Until lnSize = 0
            strTemp = strTemp & Mid$(strBody, lnStart, lnSize)
            lnStart = lnStart + lnSize + 2
            lnEnd = InStr(lnStart + 1, strBody, vbCrLf)
            If lnEnd = 0 Then Exit Do
            lnSize = Hex2Dec(Mid$(strBody, lnStart, lnEnd - lnStart))
            lnStart = lnEnd + 2
        Loop
        DecodeChunkedMessage = strTemp
    End Function
    Private Function Hex2Dec(ByVal lnHexValue) As Currency
    On Error GoTo Tempp
        Dim intLow(1) As Integer, lnHigh(1) As Long, tmpVar
        If UCase$(Left$(lnHexValue, 2)) = "&H" Then tmpVar = Mid$(lnHexValue, 3)
        lnHexValue = Right$("0000000" & lnHexValue, 8)
        If IsNumeric("&H" & lnHexValue) Then
            intLow(0) = CInt("&H" & Right$(lnHexValue, 2))
    Tempp:
            lnHigh(0) = CLng("&H" & Mid$(lnHexValue, 5, 2))
            intLow(1) = CInt("&H" & Mid$(lnHexValue, 3, 2))
            lnHigh(1) = CLng("&H" & Left$(lnHexValue, 2))
            Hex2Dec = CCur(lnHigh(1) * 256 + intLow(1)) * 65536 + (lnHigh(0) * 256) + intLow(0)
        End If
       
    End Function
    Private Function ParseCookies(ByVal strHeaders As String, ByVal strOld As String) As String
        
        Dim lnTemp(1) As Long, strKey As String, strValue As String, strTempHeaders As String, strTemp As String
        strOld = "; " & strOld
        Do Until InStrB(1, strHeaders, "Set-Cookie", vbTextCompare) = 0
            lnTemp(0) = InStr(1, strHeaders, "Set-Cookie: ") + Len("Set-Cookie: ")
            lnTemp(1) = InStr(lnTemp(0), strHeaders, "=")
            strKey = Mid$(strHeaders, lnTemp(0), lnTemp(1) - lnTemp(0))
            
            lnTemp(0) = InStr(1, strHeaders, "Set-Cookie: " & strKey & "=") + Len("Set-Cookie: " & strKey & "=")
            lnTemp(1) = InStr(lnTemp(0), strHeaders, ";")
            strValue = Mid$(strHeaders, lnTemp(0), lnTemp(1) - lnTemp(0))
            strHeaders = Mid$(strHeaders, lnTemp(1))
            If strOld = Empty Then
                strOld = strKey & "=" & strValue
            ElseIf InStrB(1, strOld, "; " & strKey & "=", vbTextCompare) <> 0 Then
                strTemp = GetStringBetween(strOld, "; " & strKey & "=", ";")
                strOld = Replace(strOld, strKey & "=" & strTemp & ";", strKey & "=" & strValue & ";")
            Else
                strOld = strOld & "; " & strKey & "=" & strValue
            End If
        Loop
        Do Until Left(strOld, 2) <> "; "
            strOld = Mid(strOld, 3)
        Loop
        Do Until Right(strOld, 2) <> "; "
            strOld = Left(strOld, Len(strOld) - 2)
        Loop
        ParseCookies = strOld
    End Function
    Public Function Headers(strMethod As String, ByVal strURL As String, strReferer As String) As String
        Dim strHost As String, strPOST As String, lnStart As Long, _
            strFile As String
        strURL = Replace(strURL, "http://", vbNullString)
        lnStart = InStr(1, strURL, "/")
        If lnStart <> 0 Then
            strFile = Mid(strURL, lnStart)
            strHost = Left(strURL, lnStart - 1)
        Else
            strHost = strURL
            strFile = "/"
        End If
        If strMethod = "POST" Then
            lnStart = InStr(1, strFile, "?")
            If lnStart <> 0 Then
                strPOST = Mid(strFile, lnStart + 1)
                strFile = Left(strFile, lnStart - 1)
            Else
                strPOST = vbNullString
            End If
        End If
        If m_UseProxy Then
            Dim strParts() As String
            strParts = Split(m_Proxy, ":", 2)
            strFile = "http://" & strHost & strFile
            strHost = strParts(0)
        End If
        Select Case m_Browser
            Case "Internet Explorer"
                Select Case strMethod
                    Case "POST"
                        Headers = "POST " & strFile & " HTTP/1.1" & vbCrLf _
                            & "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* " & vbCrLf _
                            & "Referer: " & strReferer & vbCrLf _
                            & "Accept-Language: en-gb" & vbCrLf _
                            & "Content-Type: application/x-www-form-urlencoded" & vbCrLf _
                            & "Accept-Encoding: gzip, deflate" & vbCrLf _
                            & "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" & vbCrLf _
                            & "Host: " & strHost & vbCrLf _
                            & "Content-Length: " & Len(strPOST) & vbCrLf _
                            & "Connection: Keep-Alive" & vbCrLf _
                            & "Cache-Control: no-cache" & vbCrLf _
                            & "Cookie: " & m_Cookies & vbCrLf & vbCrLf _
                            & strPOST & vbCrLf
                    Case Else
                        Headers = strMethod & " " & strFile & " HTTP/1.1" & vbCrLf _
                            & "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" & vbCrLf _
                            & "Referer: " & strReferer & vbCrLf _
                            & "Accept-Language: en-gb" & vbCrLf _
                            & "Accept-Encoding: gzip , deflate" & vbCrLf _
                            & "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" & vbCrLf _
                            & "Host: " & strHost & vbCrLf _
                            & "Connection: Keep-Alive" & vbCrLf _
                            & "Cookie: " & m_Cookies & vbCrLf & vbCrLf
                End Select
            Case Else
                Select Case strMethod
                    Case "POST"
    '                    Debug.Print strPOST
                        Headers = "POST " & strFile & " HTTP/1.1" & vbCrLf _
                            & "Host: " & strHost & vbCrLf _
                            & "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3" & vbCrLf _
                            & "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" & vbCrLf _
                            & "Accept-Language: en-us,en;q=0.5" & vbCrLf _
                            & "Accept-Encoding: gzip, deflate" & vbCrLf _
                            & "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & vbCrLf _
                            & "Keep-Alive: 300" & vbCrLf _
                            & "Connection: keep-alive" & vbCrLf _
                            & "Referer: " & strReferer & vbCrLf _
                            & "Cookie: " & m_Cookies & vbCrLf _
                            & "Content-Type: application/x-www-form-urlencoded" & vbCrLf _
                            & "Content-Length: " & Len(strPOST) & vbCrLf & vbCrLf _
                            & strPOST & vbCrLf
                    Case Else
                        Headers = strMethod & " " & strFile & " HTTP/1.1" & vbCrLf _
                            & "Host: " & strHost & vbCrLf _
                            & "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3" & vbCrLf _
                            & "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" & vbCrLf _
                            & "Accept-Language: en-us,en;q=0.5" & vbCrLf _
                            & "Accept-Encoding: gzip, deflate" & vbCrLf _
                            & "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & vbCrLf _
                            & "Keep-Alive: 300" & vbCrLf _
                            & "Connection: keep-alive" & vbCrLf _
                            & "Referer: " & strReferer & vbCrLf _
                            & "Cookie: " & m_Cookies & vbCrLf & vbCrLf
                End Select
        End Select
        If Not m_GZip Then
            Headers = Replace(Headers, "Accept-Encoding: gzip, deflate" & vbCrLf, "")
        End If
        RaiseEvent ChangedHeaders(Headers)
    End Function
    Private Function Decompress(strHTML As String) As String
        Dim lnLength As Long, strDeflated As String
        Decompress = Empty
        lnLength = ZGateInflate(strHTML, Len(strHTML), strDeflated)
        Do Until strDeflated <> Empty
            DoEvents
        Loop
        Decompress = strDeflated
    End Function
    'Winsock Subs
    Private Sub wsWrapper_Close()
        wsWrapper.Close
    End Sub
    Private Sub wsWrapper_Connect()
        strBuffer = vbNullString
    End Sub
    Private Sub wsWrapper_DataArrival(ByVal bytesTotal As Long)
        Dim strData As String
        If m_StopWrapper = True Then
            wsWrapper.Close
            Exit Sub
        End If
        'Get the new data chunk
        wsWrapper.GetData strData, vbString
        
        'Append it to buffer
        strBuffer = strBuffer & strData
    End Sub
    'User Subs/Functions
    Public Sub SetProxy(strProxy As String)
        m_UseProxy = True
        m_Proxy = strProxy
    End Sub
    Public Sub IdentifyAs(ByVal strBrowser As String)
        If strBrowser <> "Firefox" And strBrowser <> "Internet Explorer" And strBrowser <> "Opera" Then
            strBrowser = "Firefox"
        End If
        m_Browser = strBrowser
    End Sub
    Public Function GetHeaderFieldValue(ByVal strHeaders As String, ByVal strHeader As String) As String
        Dim lnStart As Long, lnEnd As Long
        If InStrB(1, strHeaders, strHeader, vbTextCompare) <> 0 Then
            lnStart = InStr(1, strHeaders, strHeader, vbTextCompare) + Len(strHeader) + 2
            GetHeaderFieldValue = Mid$(strHeaders, lnStart, InStr(lnStart, strHeaders, vbNewLine, vbTextCompare) - lnStart)
        Else
            GetHeaderFieldValue = vbNullString
        End If
    End Function
    Public Sub ClearCookies()
        m_Cookies = Empty
    End Sub
    Public Function Request(strMethod As String, ByVal strURL As String, Optional strReferer As String)
        Dim strHost As String, lnStart As Long, _
            strHeaders As String, strParts() As String, proxy As proxy, _
            blnProxy As Boolean
        If IsMissing(strReferer) Then
              strReferer = m_LastPage
        End If
        m_StopWrapper = False
        strHost = Replace(strURL, "http://", vbNullString)
        lnStart = InStr(1, strHost, "/")
        If lnStart <> 0 Then
            strHost = Left(strHost, lnStart - 1)
        End If
        Reset
        If wsWrapper.State <> 0 Then
            wsWrapper.Close
        End If
        If m_UseProxy Then
            blnProxy = SplitProxy(m_Proxy, proxy)
            If blnProxy Then
                wsWrapper.RemoteHost = proxy.intHost(1) & "." & proxy.intHost(2) & "." & proxy.intHost(3) & "." & proxy.intHost(4)
                wsWrapper.RemotePort = proxy.intPort
            Else
                wsWrapper.RemoteHost = strHost
                wsWrapper.RemotePort = 80
                m_UseProxy = False
            End If
        Else
            wsWrapper.RemoteHost = strHost
            wsWrapper.RemotePort = 80
        End If
        wsWrapper.Connect
        Do Until wsWrapper.State = 7 Or Elapsed > m_Timeout Or m_StopWrapper
            DoEvents
        Loop
        If wsWrapper.State <> 7 Then
            Exit Function
        End If
        If m_StopWrapper Then
            Exit Function
        End If
        m_LastPage = strURL
        If m_StopWrapper Then
            Exit Function
        End If
        wsWrapper.SendData Headers(strMethod, strURL, strReferer)
        If m_StopWrapper Then
            Exit Function
        End If
        Do Until wsWrapper.State = sckClosed
            DoEvents
        Loop
        If strBuffer = Empty Then
            Request = Request(strMethod, strURL, strReferer)
            Exit Function
        End If
        
        strParts = Split(strBuffer, vbCrLf & vbCrLf, 2)
        
        m_Cookies = ParseCookies(strParts(0), m_Cookies)
        If GetHeaderFieldValue(strParts(0), "Transfer-Encoding") = "chunked" Then
            strParts(1) = DecodeChunkedMessage(strParts(1))
        End If
        If GetHeaderFieldValue(strParts(0), "Content-Encoding") = "gzip" Then
            strParts(1) = Decompress(strParts(1))
        End If
        Request = strParts(0) & vbNewLine & vbNewLine & strParts(1)
        m_Elapsed = Elapsed
        RaiseEvent RequestComplete(Request, strMethod)
        
    End Function
    'Timeout timer subs
    Private Sub Reset()
        QueryPerformanceFrequency curFrequency
        QueryPerformanceCounter curStart
        curFrequency = curFrequency * 10000
    End Sub
    Private Function Elapsed() As Double
        QueryPerformanceCounter curStop
        Elapsed = (curStop - curStart) / curFrequency * 10000000
    End Function
    Private Function Wait(ByVal lnMilliseconds As Long)
        Dim curStop As Currency, curStart As Currency, _
            curFrequency As Currency
        QueryPerformanceFrequency curFrequency
        QueryPerformanceCounter curStart
        curFrequency = curFrequency * 10000
        QueryPerformanceCounter curStop
        Do Until ((curStop - curStart) / curFrequency * 10000000) >= lnMilliseconds
            QueryPerformanceCounter curStop
            DoEvents
        Loop
    End Function
    Public Function URLEncode(strURL As String) As String
        Dim intForX As Integer, strCharacter As String
        Const strValid = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz:/.?=_-$(){}~&"
        If Len(strURL) > 0 Then
            For intForX = 1 To Len(strURL)
                strCharacter = Mid(strURL, intForX, 1)
                If InStr(1, strValid, strCharacter, vbBinaryCompare) = 0 Then
                    strCharacter = Hex(Asc(strCharacter))
                    If strCharacter = "20" Then
                        strCharacter = "+"
                    ElseIf Len(strCharacter) = 1 Then
                        strCharacter = "%0" & strCharacter
                    Else
                        strCharacter = "%" & strCharacter
                    End If
                End If
                URLEncode = URLEncode & strCharacter
            Next intForX
        End If
    End Function
    Public Function GetStringBetween(ByVal InputText As String, ByVal StartText As String, ByVal EndText As String, Optional ByVal StartPosition = 1) As String
        Dim lnTextStart As Long
        Dim lnTextEnd As Long
        lnTextStart = InStr(StartPosition, InputText, StartText, vbTextCompare) + Len(StartText)
        lnTextEnd = InStr(lnTextStart, InputText, EndText, vbTextCompare)
        If lnTextStart >= (StartPosition + Len(StartText)) And lnTextEnd > lnTextStart Then
            GetStringBetween = Mid$(InputText, lnTextStart, lnTextEnd - lnTextStart)
        Else
            GetStringBetween = ""
        End If
    End Function

  4. #4
    Reemer's Avatar
    Joined
    Dec 2011
    Posts
    639
    Userbars
    8
    Thanks
    364
    Thanked
    446/256
    DL/UL
    39/0
    Mentioned
    203 times
    Time Online
    4d 13h 47m
    Avg. Time Online
    1m
    Do you have zgate.dll in your install directory? That was my problem for a while

  5. #5
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,720
    Userbars
    166
    Thanks
    5,906
    Thanked
    33,076/6,608
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 4h 55m
    Avg. Time Online
    3h 13m
    ^Yeah, you need zgate.dll

    It is being used for GZIP decompression in this code.
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  6. #6
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Try turning off the wrapper's gzip decompression by setting either the .UseGzip or .GZipEnabled property to false. Then let us know if it can get the full page request.

    Code:
    strHTML = w.Request("GET", "http://www.neopets.com/", "http://www.google.com")
    txt1.text = strHTML

  7. #7

    Integra's Avatar
    Joined
    Nov 2013
    Posts
    213
    Userbars
    3
    Thanks
    53
    Thanked
    45/32
    DL/UL
    25/0
    Mentioned
    12 times
    Time Online
    4d 18h 34m
    Avg. Time Online
    1m
    Doesn't seem to be solving the issue, I've got ZGate in Sys32 and in the directory the project is saved in. Not sure if it should be elsewhere, can't imagine so but feel free to correct me if I'm wrong.

  8. #8
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Quote Originally Posted by Integra View Post
    Doesn't seem to be solving the issue, I've got ZGate in Sys32 and in the directory the project is saved in. Not sure if it should be elsewhere, can't imagine so but feel free to correct me if I'm wrong.
    Keep it in system32, also put it in the same directory as your .exe

    PROTIP use VBNet

  9. #9
    Josh's Avatar
    Joined
    Dec 2011
    Posts
    415
    Userbars
    2
    Thanks
    25
    Thanked
    378/143
    DL/UL
    82/6
    Mentioned
    120 times
    Time Online
    17d 9h 48m
    Avg. Time Online
    5m
    Quote Originally Posted by Zachafer View Post
    PROTIP use VBNet
    ^That.


    vb6 is a waste. Not worth learning. I regret wasting my time on it

  10. #10

    Integra's Avatar
    Joined
    Nov 2013
    Posts
    213
    Userbars
    3
    Thanks
    53
    Thanked
    45/32
    DL/UL
    25/0
    Mentioned
    12 times
    Time Online
    4d 18h 34m
    Avg. Time Online
    1m
    I agree its wasteful, but I know it and 2012 :\

    I'm going to finish my score sender list maker in VB6 then probably try and migrate myself up to Python or VS2012/13. I'm just gonna use Gluraks to finish this then.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •